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

Can arraylist contain duplicates?

497


What is a map programming?

484


Is treeset sorted?

524


Define collision in hashing?

494


What is the difference between Array and LinkedList?

560






Why do we need to recycle?

452


How do you implement a stack?

480


How are elements stored in hashset?

465


Does linkedhashset allow duplicates?

432


What is harvesting in agriculture?

499


Which is better hashset or treeset?

494


What are b tree keys?

454


What is difference between hashmap and treemap?

494


Which sort algorithm is best?

489


What will happen if an array goes out of bounds?

667