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

What is data structure and why we need it?

690


What data type is enum?

724


Tell us the difference between merge and quick sort. Which one would you prefer and why?

841


What is the difference between a Stack and a Queue.

728


What is time and space complexity of bubble sort?

631


What is the use of tree data structure?

695


How do you declare An array of three char pointers

711


What is a string array?

711


Define hashing?

821


Define binary tree insertion.

776


What are linked lists most commonly used for?

683


Which sorting algorithm is best for small data?

660


How do signed and unsigned numbers affect memory?

714


Define a relation?

761


Write a recursive c function to calculate the height of a binary tree.

714