What is the best way to imlement linked list of numbers?

Discussion in 'Programming' started by grigorianvlad, Sep 15, 2010.

  1. grigorianvlad

    grigorianvlad New Member

    Sep 15, 2010
    Likes Received:
    Trophy Points:
    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!

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice