Thursday, January 26, 2012

Data structure interview questions Part 13


Data structure questions:What is the main difference between Storage structure and file structure and how?  
Answer:The representation of a particular data structure in the memory of a computer is called storage structure whereas a storage structure representation in auxiliary memory is often called a file structure. 

Data structure questions:Clarify whether Linked List is linear or Non-linear data structure?
Answer:Link list is always linear data structure because every element (NODE) having unique position and also every element has its unique successor and predecessor. Also,linear collection of data items called nodes and the linear order is given by means of pointers. Each node is divided into two parts. First part contains information of the element and another part contains the address of the next node in the list. 

Data structure questions:Explain simulation  
Answer:Simulation is the process of forming an abstract model from a real situation in order to understand the impact of modifications and the effect of introducing various strategies on the situation. It is a representation of real life system by another system, which describes the important characteristics of real system and allows experiments on it. 

Data structure questions:Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?
Answer:Minimal spanning tree assures that the total weight of the tree is kept at its minimum but it doesn't mean that the distance between any two nodes involved in the minimum-spanning tree is minimum. 

Data structure questions:In an AVL tree, at what condition the balancing is to be done?
Answer:If the pivotal value (or the Height factor) is greater than 1 or less than 1.If the balance factor of any node is other than 0 or 1 or -1 then balancing is done.The balancing factor is height. The difference in height of the right subtree and right subtree should be +1 ,-1 or 0 

Data structure questions:What is the main difference between ARRAY and STACK?
Answer:Stack follows LIFO. Thus the item that is first entered would be the last removed.In array the items can be entered or removed in any order. Basically each member access is done using index and no strict order is to be followed here to remove a particular element .Array may be multi dimensional or one dimensional but stack should be one-dimensional.
Size of array is fixed, while stack can be grow or shrink. We can say stack is dynamic data structure.

Read more...

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Back to TOP