what is a complexity of linear search,binery search?

Answer Posted / lokesh bhatt

o(n)= linear
o(log n)(base 2)= binary
bcz in linear v search one be one while in binary v divide array in two part every time

Is This Answer Correct ?    15 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who invented quicksort?

514


How expression trees are gets represented in data structure?

500


What is default array size?

563


If you do not initialize an array what will happen?

598


What is difference between rb tree and avl tree?

468






what is the biggest advantage of linked lists?

559


Which sorting is worst?

591


Explain exception filter?

545


Explain the priority queue?

523


Is complete binary tree?

483


Can arraylist be empty?

462


What's the difference between a hashtable and a hashmap?

456


Which sort is stable?

541


Write the steps involved in the insertion and deletion of an element in the stack.

906


Can we create a null as a key for a map collection?

519