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 do you understand by stable sort?

524


How can you add an item to the beginning of the list?

560


What is the use of isEmpty() member methods?

523


Is hashmap ordered?

532


What is the use of data structure?

514






What is a threaded binary tree? Explain its operation with example?

666


What is the difference between Strings and Arrays?

526


Briefly explain recursive algorithm?

621


What are the main differences between the linked list and linear array?

524


what is the difference between Linear Array and Linked List?

580


How to sort 1 million floating point numbers?

667


Tell me is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

516


How do I push an element into a stack?

481


Which sorting technique is best?

521


Explain what is the type of the algorithm used in solving the 8 queens problem?

469