what is a complexity of linear search,binery search?

Answer Posted / geetika sharma

No, Above answer is wrong. The complexity of Linear search
is O(n) and
Binary search is O(log n) at the base 2

Is This Answer Correct ?    212 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scalar data type?

798


Define non linear data structure.

762


What are lists?

740


What are the advantages of binary search over linear search?

847


What do you mean by level of the tree?

777


What is the use of bubble sort?

711


Write a program to reverse a single linked list.

732


What is the best data structure and algorithm to implement cache?

739


What is the difference between for and foreach loop?

669


When would you use a tuple?

653


Explain about map and their types?

803


What is a pass in bubble sort?

699


What is the height of an empty tree?

703


Is char array null terminated?

669


What is a map programming?

688