how to search an element in sorted linked list with time
complexity is O(log n).

Answer Posted / pritam

we can use the binary search algorithm for this problem because this searching algorithm has O(log n) performance in both worse and average case.

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which algorithm is used in arrays sort?

563


What is an ordered map?

574


What is the difference between dictionary and hashtable?

606


What is quick sort example?

564


Define articulation point?

818






What are priority queues?

594


How is a hashset implemented?

558


Define outdegree of a graph?

629


Define disjoint set adt?

618


Describe avl tree or height balanced binary search tree.

598


If you are using c language to implement the heterogeneous linked list, what pointer type should be used?

732


Why do we use dynamic arrays?

542


What is precision?

656


What are different types of algorithms?

566


Tell me can the size of operator be used to tell the size of an array passed to a function?

600