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

What data structure does a binary tree degenerate?

446


Is quicksort divide and conquer?

499


Does hashmap allow null keys?

470


What is shell sort in data structure?

474


How many types of data structures are there?

525






What is raid (redundant array of inexpensive disks)? Explain its level?

473


Can an arraylist be null?

468


Can we change the size of an array at run time?

528


Does treemap sort on key or value?

481


How to get top two numbers from an array?

584


Differentiate between list and map.

593


What is ds tree?

512


What is the minimum number of queues that can be used to implement a priority queue?

516


Differentiate between set and map.

614


Is array size dynamic or fixed?

494