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

How to find the missing element in integer array of 1 to 7?

522


What is mean by abstract data type?

518


Define distributed query and linked server?

555


What is binary search in programming?

494


Why do we use sorting?

470






How does a selection sort work?

481


Which interfaces are implemented by concurrentskiplistset?

485


Why are b trees used?

511


What are hash tables good for?

467


Which is the simplest file structure? (a) Sequential (b) Indexed (c) Random (a) Sequential

698


Can we apply binary search algorithm to a sorted linked list, why?

496


Can I provide array size dynamically?

521


Is binary tree balanced?

467


How many types of priority queue are there?

478


Can nsarray contain nil?

455