What is the best way to imlement linked list of numbers?
I am new to C++ so please go easy on the technical jargon. Have a question about linked list - or may be there is a better way to do this.
Here is the idea and I have no idea on how to implement it. Suppose we have a large file with numbers that are entered by users which are mostly repetitive (the numbers, not the users!) Something like this:
Suppose this file is in gigabytes. What I want to do is to take each entered number, decompose it to individual digits, link them somehow, create pointers in memory to their position within the line and then write only the different (new) combination of numbers and their positions.
I realize it would be easier to write the numbers as they are if this was a small amount of data. But what I am trying to do is to speed up writing and reading speed and decrease the space usage.
1) What is the best way to do this? Linked lists and memory pointers? Examples?
2) Will space and storage difference be positive?
Thanks a lot!
|All times are GMT +5.5. The time now is 11:15.|