link list

Hello everyone,
I am studying link list in c
I have a project in which I have lookup table of rpm (clocks used to load the timer used for motor).
This rpm table, I am taking in an array
Now I want to implement a link list which will access the rpm from table and load it to timer of clock used for running the motor
Is it possible
Because as I am studying the link list, in that it is mentioned that link list is used instead of array
Is it possible to access an array elements using link list ?
If yes, then pls suggest me some link for it
Correct me if I am wrong
Thank u all

Parents
  • I have a project in which I have lookup table of rpm (clocks used to load the timer used for motor).

    Linked lists are usually used for dynamic data structures, i.e. when you're adding and removing elements during the run-time of the program. I don't think that usual lookup-tables do this.

    Is it possible

    It's possible, but in this case it looks like the completely wrong tool for the job at hand. The linked list will take up more memory and have a longer access time than a straight lookup table using an array.

    Because as I am studying the link list, in that it is mentioned that link list is used instead of array

    If you want to study linked lists, then you should also study when it's appropriate and advantageous to use them. A lookup table doesn't really fit the bill here.

Reply
  • I have a project in which I have lookup table of rpm (clocks used to load the timer used for motor).

    Linked lists are usually used for dynamic data structures, i.e. when you're adding and removing elements during the run-time of the program. I don't think that usual lookup-tables do this.

    Is it possible

    It's possible, but in this case it looks like the completely wrong tool for the job at hand. The linked list will take up more memory and have a longer access time than a straight lookup table using an array.

    Because as I am studying the link list, in that it is mentioned that link list is used instead of array

    If you want to study linked lists, then you should also study when it's appropriate and advantageous to use them. A lookup table doesn't really fit the bill here.

Children
More questions in this forum