Which one is faster?
A binary search of an orderd set of elements in an array
or
a sequential search of the elements.
Answer Posted / naresh
binary search..if the elements are not in a sorted order
then sequential search or linear search would be better.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
How can you insert a node to the beginning of a singly linked list?
How do you solve a selection sort?
What is arrays copyof?
How would you check if a binary tree is BST or not ? Write a program.
Write an algorithm to show the postfix expression with the input given as : a b + c d +*f ? .
What are the different types of collections?
Define a relation?
What is adt in data structure with example?
Write an algorithm for inserting and deleting an element from doubly linked list?
What is the complexity of bubble sort?
Why null is allowed in hashmap?
What are the advantages of linked list?
Given an unsorted linked list, and without using a temporary buffer, write a method that will delete any duplicates from the linked list?
Does linked list allow duplicates?
What do u mean by data type?