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


Please Help Members By Posting Answers For Below Questions

Differentiate among cycle, path, and circuit?

608


Explain the term tail recursion?

641


What is array in data structure with example?

546


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

1226


Why it is said that searching a node in a binary search tree is efficient than that of a simple binary tree?

687






What is ds tree?

601


Can I provide array size dynamically?

606


Parenthesis is never required in postfix or prefix expressions, why?

599


How to reverse a singly linked list?

627


What is data structure explain in detail?

588


What is an externalizable interface?

614


What are the basic data structures?

592


Is treeset synchronized?

538


Can you make an arraylist of arrays?

659


Can arraylist be empty?

547