Sunday 15 August 2010

How to search for data in a linked list? c++ interview question

The only way to search a linked list is with a linear search, because the only way a linked lists members can be accessed is sequentially. Sometimes it is quicker to take the data from a linked list and store it in a different data structure so that searches can be more efficient.

No comments:

Post a Comment