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
Does treemap allow null key?
What are threaded binary trees?
What is linear-logarithm chasm?
write a program to show the insertion and deletion of an element in an array using the position
What is worst case complexity algorithm?
Why is treeset sorted?
Why do we use stacks?
Explain the uses of b+ tree.
Which sorting algorithm is worst?
Explain the difference between hashset and hashmap?
What is the advantage of circular linked list?
Explain what are the major data structures used in the rdbms?
What is height balanced tree?
Draw the B-tree of order 3 created by inserting the following data arriving in sequence – 92 24 6 7 11 8 22 4 5 16 19 20 78
Is pointer a variable?