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 / p.divya poojitha
binary search is faster than sequential searching.in
sequential searching the desired record is 4000 if u search
that record can be done with 1....4000 so it takes large
time for searching compare complexities of both searching
meathods are
binary search O(logn)
sequential search O(n)
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How do arrays work?
State the merit of linked representation of binary trees?
Write an algorithm to find middle element in the linked list.
What is the difference between array and stack?
What are different methods of collision resolution in hashing.
What is linear and non linear structure?
What is dangling pointer and how to avoid it?
Will it create any problem if we add elements with key as user defined object into the treemap?
What is the best case complexity of bubble sort?
Write the syntax in c to create a node in the singly linked list.
Is quicksort divide and conquer?
Different Types of pattern?
What is time complexity of hashmap?
Explain the expression trees?
Define linear data structures?