Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
 SiteMap shows list of All Categories in this site.

 Categories  >>  Software  >>  Operating Systems  >>  Data Structures

 Windows Interview Questions Linux Interview Questions Unix Interview Questions Solaris Interview Questions RTOS Interview Questions Bulnex Interview Questions Operating Systems General Concepts Interview Questions Data Structures Interview Questions Operating Systems AllOther Interview Questions
Question
Which one is faster?
A binary search of an orderd set of elements in an array
or
a sequential search of the elements.
Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 1
binary search
 Is This Answer Correct ? 31 Yes 1 No
Suchita

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 2
binary search if of order log n where as sequential search
is of order n
binary search is faster..

 Is This Answer Correct ? 31 Yes 1 No
Srikanth

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 3
Binary search is faster
 Is This Answer Correct ? 10 Yes 2 No
Spandana

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 4
Binary search is faster because we traverse the elements by
using the policy of Divide and Conquer.
we compare the key element with the approximately center
element, if it is smaller than it search is applied in the
smaller elements only otherwise the search is applied in the
larger set of elements.
its complexity is as we all know is log n as compared to the
sequential one whose complexity is n.

 Is This Answer Correct ? 24 Yes 1 No
Nishant Singh

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 5
The binary search is faster than the sequential search.The
complexity of binary search is 'log n' where as the
complexity of sequential search is 'n'.Since each time we
are proceeding we have to deal with only half of the
elements of the array than the previous one.So we can easily
get a number from an array of elements through binary search
than sequential search.

 Is This Answer Correct ? 11 Yes 0 No
Ahan

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 6
obviously binary search
 Is This Answer Correct ? 10 Yes 0 No
Suresh

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 7
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
Naresh

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 8
binary search is faster and more useful in case we need to
perform search a number of times, complexity of sequential
search will be n each time where in binary search will take
more time only at first time when data is not sorted once
the data is sorted......it will take only only log n
attempts to search each element.......so the decision also
depends on frequency of the data beign searched

 Is This Answer Correct ? 6 Yes 0 No
Ujjwal Dave

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 9
Binary Search is efficent and faster because in Binary
search we search in systematic way which helps to fetch the
data easy. where as in Sequential search we have to come
across tll the nodes to get the desired data.

 Is This Answer Correct ? 5 Yes 4 No
Angu

Re: Which one is faster? A binary search of an orderd set of elements in an array or a sequential search of the elements.
# 10
binarysearch is paster then sequentiolsearch
 Is This Answer Correct ? 7 Yes 1 No
Mahes

  Question Asked @ Answers Other Data Structures Interview Questions When will you sort an array of pointers to list elements, rather than sorting the elements themselves? 5 How will inorder, preorder and postorder traversals print the elements of a tree? 11 input function and output function in c language Tcs 2 Convert the following infix expression to post fix notation ((a+2)*(b+4)) -1 9 Parenthesis are never needed in prefix or postfix expressions. Why? Microsoft 11 How is it possible to insert different type of elements in stack? TCS 7 1) Program A and B are analyzed and found to have worst- case running times no greater than 150nlog2n and n2 respectively.Answer the folloWing questions if possible.. i) which program has the better guarantee on the running time,for larger values of n(n>10000) ? ii) which program has the better guarantee on the running time,for small values of n(n<100) ? iii) which program will run faster on average for n =1000 2) wRite a program to compute the number of collisions required in a long random sequence of insertions using linear probing ,quadratic probing and double hashing 3) what is the optimal way to compute A1 A2 A3 A4 A5 A6 where the dimensions of the matrices are A1:10*20 A2 : 20 * 1 A3 : 1 * 40 A4 : 40*5 A5 : 5 * 30 A6 : 30 X 15 KPIT 3 Q # 1 : in which graph algorithm do we start finding vertices that should be first in the topological order and then apploy the fact that every vertex must come before its successors in the topolgical order. 3 create an singly linked lists and reverse the lists by interchanging the links and not the data? Microsoft 13 What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm? CTS 3 Explain binary searching, Fibinocci search. IBM 5 A list is ordered from smaller to largest when a sort is called. Which sort would take the shortest time to execute? 17 For more Data Structures Interview Questions Click Here