what is a complexity of linear search,binery search?

Answer Posted / pratik wavhal

For Linear Search Complexity Is :- O(n).
For Binary Search Complexity Is :- O(log(at base 2)n).

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to show the insertion and deletion of an element in an array using the position

498


What happens in insertion sort?

487


What are the different data structures?

508


What are three common types of traversals?

450


Can arraylist contain null?

467






What are the tasks performed during preorder traversal?

619


What do you mean by double hashing?

574


Is arraylist heterogeneous?

493


Is it necessary to sort a file before searching a particular item ?

550


How to get top two numbers from an array?

584


What is bubble sort algorithm in data structure sort and searching?

527


What is an array vs list?

480


Define the term “percolate up”?

496


Are hash tables ordered?

473


What does isempty() member method determines?

547