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 / rohini c
Binnary search tree complexity is log n where as linear search terr complexity is 'n'so it is quite clear from complexity that Binnary tree is faster than sequential search or linear search........complexity means rate of execution time.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is sort in data structure?
How can someone display singly linked list from first to last?
What is hashing with example?
Is null a binary search tree?
Why do we need linked list?
What are hash tables good for?
What is the function of stack?
Can the double-checked locking fail on a single processor system?
Is treeset thread safe?
Is map a collection?
Is hashset thread safe?
Which sorting algorithm has minimum number of swaps?
What is the difference between array and stack?
What are the types of binary tree?
What is the purpose of tochararray ()?