what is a complexity of linear search,binery search?

Answer Posted / hemant belwal

linear search=n/2
binary search=iog2n,2 in the base of log.

Is This Answer Correct ?    36 Yes 91 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are the major data structures used in the network data model?

783


How memory is reserved using a declaration statement in data structure?

839


If I try to add enum constants to a treeset, what sorting order will it use?

932


How to do the intersection of two sorted arrays?

765


How to initialize Dictionary using collection initialize?

765


What is a stable sort?

686


Do you know how to find if linked list has loop?

829


What is an recursive algorithm?

736


How do you do a heap sort?

670


how to delete first node from singly linked list?

869


What is the difference between linked list and array?

681


What are the applications of b-tree?

768


Differentiate between hashset and hashmap.

710


How do you separate zeros from non-zeros in an array?

719


Differentiate between iterator and listiterator.

815