ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Operating Systems  >>  Data Structures
 
 


 

 
 Windows interview questions  Windows Interview Questions
 Linux interview questions  Linux Interview Questions
 Unix interview questions  Unix Interview Questions
 Solaris interview questions  Solaris Interview Questions
 RTOS interview questions  RTOS Interview Questions
 Bulnex interview questions  Bulnex Interview Questions
 Operating Systems General Concepts interview questions  Operating Systems General Concepts Interview Questions
 Data Structures interview questions  Data Structures Interview Questions
 Operating Systems AllOther interview questions  Operating Systems AllOther Interview Questions
Question
What is the average number of comparisons in a sequential
search?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the average number of comparisons in a sequential search?
Answer
# 1
f(n)= 1.Pn + 2.Pn + 3.Pn +...+ N.Pn 
  where 
       Pn = 1/N
f(n)= 1.1/N +2.1/N + 3.1/N+....+N.1/N
    = (1+2+3+....+N)1/N
    = N(N+1)/2N
    = (N+1)/2
 
Is This Answer Correct ?    1 Yes 0 No
Vivek Tiwari
 
  Re: What is the average number of comparisons in a sequential search?
Answer
# 2
n/2(if array contains n elements)
 
Is This Answer Correct ?    0 Yes 2 No
Pavan
 
 
 

 
 
 
Other Data Structures Interview Questions
 
  Question Asked @ Answers
 
How will inorder, preorder and postorder traversals print the elements of a tree?  6
Explain about the types of linked lists  4
What is the maximum total number of nodes in a tree that has N levels? Note that the root is level (zero) Sasken8
Write a Binary Search program  2
What is the average number of comparisons needed in a sequential search to determine the position of an element in an array of 100 elements, if the elements are ordered from largest to smallest? ABB10
The element being searched for is not found in an array of 100 elements. What is the average number of comparisons needed in a sequential search to determine that the element is not there, if the elements are completely unordered? Morgan-Stanley7
Which sort show the best average behavior?  6
What is a data structure? Keane-India-Ltd3
What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?  2
What do you mean by: Syntax Error, Logical Error, Runtime Error?  2
In which data structure, elements can be added or removed at either end, but not in the middle? Wipro19
Evaluate the following prefix expression " ++ 26 + - 1324" Patni8
What are the parts of root node? BMC2
How would you sort a linked list?  2
Parenthesis are never needed in prefix or postfix expressions. Why?  6
Explain binary searching, Fibinocci search. IBM1
What do you mean by Base case, Recursive case, Binding Time, Run-Time Stack and Tail Recursion? TCS1
Write the programs for Linked List (Insertion and Deletion) operations  1
How many different binary trees and binary search trees can be made from three nodes that contain the key values 1, 2 & 3? iGate9
Convert the following infix expression to post fix notation ((a+2)*(b+4)) -1  7
 
For more Data Structures Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com