Top Data Structures Interview Questions :: ALLInterview.com http://www.allinterview.com Top Data Structures Interview Questions en-us Which one is faster? A binary search of an orderd set of elements in http://www.allinterview.com/showanswers/10668.html binary search In which data structure, elements can be added or removed at either e http://www.allinterview.com/showanswers/10665.html linked list What is B+ tree? http://www.allinterview.com/showanswers/56794.html A B+ tree is a data structure in which records associated with the search keys are at the leaves of the tree.This provide efficient retrieval,insertion and removal of records.Keys are triplicale to the non-leaf nodes to provide a path to the Parenthesis are never needed in prefix or postfix expressions. Why? http://www.allinterview.com/showanswers/10667.html Basically Parenthesis indicate the operations which need to be carried out first ie according to the BODMAS rule..SO in case of postfix or prefix expression they are actualy conversions of the orginal standard equation.Where the brackets have a Which data structure is needed to convert infix notations to post fix http://www.allinterview.com/showanswers/10662.html stack How will inorder, preorder and postorder traversals print the element http://www.allinterview.com/showanswers/10666.html void inorder(node * tree) { if(tree != NULL) { inorder(tree->leftchild); printf("%d ",tree->data); inorder(tree->rightchild); } else return; } void postorder(node * tree) { if(tree != NULL) { pos What do you mean by: Syntax Error, Logical Error, Runtime Error? http://www.allinterview.com/showanswers/10663.html Syntax Error-Errors in coding which do not follw language syntax format. It can occur by human mistak in typing & due lack knowledge of language . EX - Ram are a boy. error correct- Ram is a boy. Logical Error- Here is correct, p Which sort show the best average behavior? http://www.allinterview.com/showanswers/10660.html quick sort How many different binary trees and binary search trees can be made f http://www.allinterview.com/showanswers/10654.html one binary search tree and 9 binary trees. What is the average number of comparisons needed in a sequential sear http://www.allinterview.com/showanswers/10659.html n comparisons. When will you sort an array of pointers to list elements, rather tha http://www.allinterview.com/showanswers/10657.html when you are using linked lists for storing the elements. A list is ordered from smaller to largest when a sort is called. Whic http://www.allinterview.com/showanswers/10656.html quick sort What is the average number of comparisons in a sequential search? http://www.allinterview.com/showanswers/10661.html 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 The element being searched for is not found in an array of 100 elemen http://www.allinterview.com/showanswers/10658.html 100 comparisions since element is not there and the data is unordered we need to compare with each and every element What is the maximum total number of nodes in a tree that has N levels http://www.allinterview.com/showanswers/10653.html (n)2-1