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
thanx for reply Andy; i know my project doesnot need any link list but to study purpose i want to implement, so that i will be familier with link list can u suggest me any link for this topic thank u again
www.8052.com/.../read.phtml
apart from the obvious disadvantage of dynamic memory allocation, you might also want to consider the cost in terms of computation cycles: O(n) in the worst case for a linked list, unless some mostly useless tricks are used (that consume CPU cycles while maintaining them) like (I am not sure I am using the correct terminology here) "jump lists", that reduce average access time to O(log(n)).
"apart from the obvious disadvantage of dynamic memory allocation"
As already noted, it is perfectly possible to use linked-lists without any use of dynamic memory allocation!
The example I cited illustrates this.
Andy, Where did I say otherwise? Of it is possible.
I meant, of course: "of course it is possible."