what is a complexity of linear search,binery search?

Answer Posted / hemant belwal

linear search=n/2
binary search=iog2n,2 in the base of log.

Is This Answer Correct ?    36 Yes 91 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the stack overflow condition.

583


Define internal nodes?

539


how to add an item to the beginning of the list?

579


Is quicksort divide and conquer?

499


what is traversal in linked lists?

571






How do you balance a tree?

511


How do you search for a target key in a linked list?

753


What are the difference between a stack and a queue?

522


When is a binary search best applied?

490


How can you insert a node at the end of linked list?

487


What will be the output of below code?

602


How to get the index of an array element?

542


Which is faster array or linked list?

454


What is faster array or arraylist?

463


Give a basic algorithm for searching a binary search tree?

494