Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

For sequential data models like LinkedList, search algorithms like linear-search and binary-search are well known.

Are their any other search algorithms apart from these two, that work on sequential data models like LinkedList?

Note: As far as representation is concerned tree can also be a sequential data model(using python: [[4, 5, 6], [1, 3, 9], 7]) but that is not relevant to this question.

share|improve this question
1  
If a tree can be a sequential model, then so can any other search data structure such as a hash table, skip list, radix or trie. –  Robert Harvey Jul 30 at 4:20
    
@RobertHarvey Tree is a sequential data model from representation perspective, but array and linked list actually are sequential in nature. In tree you have breadth and depth. –  overexchange Jul 30 at 4:40
2  
linear-search and binary-search are just algorithms that are laid over the top of an array or linked list. You can do the same with any other search algorithm/data structure. Your linked list nodes can also be in a hashtable, for example. –  Robert Harvey Jul 30 at 5:01
    
Arrays are not sequential data models. They're random-access, and this is crucial to the fact that certain algorithms have the run-time they have. There's a world of difference between algorithms that require random access and those that don't, so it makes little sense to ask "What search methods are there for arrays or linked lists?" –  Kilian Foth Jul 30 at 6:43
1  
Binary search does not work (well) on linked lists. –  Raphael Jul 30 at 12:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.