Data Structure Interview Questions & Answers  Learning Mode  
COOLINTERVIEW.COM
DATABASE INTERVIEW QUESTIONS
DATA STRUCTURE INTERVIEW QUESTIONS QUESTIONS & ANSWERS  LEARNING MODE


Data Structure Interview Questions & Answers  Learning ModeA data structure is a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Any data structure is designed to organize data to suit a specific purpose so that it can be accessed and worked with in appropriate ways. A data structure is a collection of data items stored in memory, in addition a number of operations are provided by the software to manipulate that data structure. Data Structure is a way of collecting and organising data in such a way that we can perform operations on these data in an effective way. 

Try Data Structure Interview Questions & Answers  Exam Mode  
Data Structure Interview Questions & Answers  Learning Mode 
Try Data Structure Interview Questions & Answers  Exam Mode 
Question: What are the various kinds of sorting techniques? Which is has best case?
Answer: Bubble sort,Quick sort,Insertion sort,Selection sort Merge sort,Heap sort Among the sorting algorithms quick sort is the best one Source: CoolInterview.com 
Question: Whether Linked List is linear or Nonlinear data structure?
Answer: According to Access strategies Linked list is a linear one. According to Storage Linked List is a Nonlinear one. Source: CoolInterview.com 
Question: If you are using C language to implement the heterogeneous linked list, what pointer type will you use?
Answer: The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type. Source: CoolInterview.com 
Question: What is the 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. No strict order is to be followed here to remove a particular element. Source: CoolInterview.com 
Question: Define and explain ?push? and ?pop??
Answer: The insertion operation is referred to as ?push? and the deletion operation is referred to as ?pop?. Since, insertion and deletion operations are performed at one end of the stack; the elements can only be removed in the opposite order from that in which they were added to the stack. This phenomenon is observed in conjunction with recursive functions. Source: CoolInterview.com 
Question: Define stack?
Answer: An important sub class of lists permits the insertion or deletion of an element to occur only at one end. A linear list belonging to this sub class is called a stack. Source: CoolInterview.com 
Question: What is splitting?
Answer: Splitting refers to the rehashing of a bucket b and its overflow in order to distribute the keys in them among b and one other primary location. Source: CoolInterview.com 
Question: List out the areas in which data structures are applied extensively ?
Answer: Compiler Design, Operating System, Database Management System, Statistical analysis package, Numerical Analysis, Graphics, Artificial Intelligence, Simulation Source: CoolInterview.com 
Question: How can a node be inserted in the middle of a linked list?
Answer: By repointing the previous and the next elements of existing nodes to the new node. You can insert a node in the middle of a linked list by repointing the previous and the next elements of existing nodes to the new node. Source: CoolInterview.com 
Question: In RDBMS, what is the efficient data structure used in the internal storage representation?
Answer: B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makes searching easier. This corresponds to the records that shall be stored in leaf nodes. Source: CoolInterview.com 
Question: What is linear hashing?
Answer: In linear hashing, the table is gradually expanded by splitting the buckets in order until the table has doubled its size. Source: CoolInterview.com 
Question: List out the areas in which data structures are applied extensively?
Answer: Compiler Design, Operating System, Database Management System, Statistical analysis package, Numerical Analysis, Graphics, Artificial Intelligence, Simulation. Source: CoolInterview.com 
Question: State the theorem which is used to determine whether a given expression is valid or not.
Answer: A polish suffix formula is well formed if and only if the rank of the formula is ?one? and the rank of any proper head of a polish formula is greater than or equal to ?one?. Source: CoolInterview.com 
Question: Define an addressing function for a data structure?
Answer: An addressing function for a data structure consisting of n elements is a function which maps the ith element of the data structure onto an integer between one and n. In the case of a vector, the addressing function f maps the ith element onto the integer (i). Source: CoolInterview.com 
Question: What is a priority queue?
Answer: Waiting queue may not operate on a strictly first in first out basis, but on some complex priority scheme based on such factors as what compiler is being used, the execution time required, number of print lines, etc. The resulting queue is called a priority queue. Source: CoolInterview.com 
Question: 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 minimumspanning tree is minimum. Source: CoolInterview.com 
Question: When can you tell that a memory leak will occur?
Answer: A memory leak occurs when a program loses the ability to free a block of dynamically allocated memory. Source: CoolInterview.com 
Question: How do you assign an address to an element of a pointer array ?
Answer: We can assign a memory address to an element of a pointer array by using the address operator, which is the ampersand (&), in an assignment statement such as ptemployee[0] = &projects[2]; Source: CoolInterview.com 
Question: Why do we Use a Multidimensional Array?
Answer: A multidimensional array can be useful to organize subgroups of data within an array. In addition to organizing data stored in elements of an array, a multidimensional array can store memory addresses of data in a pointer array and an array of pointers. Multidimensional arrays are used to store information in a matrix form. e.g. a railway timetable, schedule cannot be stored as a single dimensional array. One can use a 3D array for storing height, width and length of each room on e Source: CoolInterview.com 
Question: What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model?
Answer: 1. RDBMS Array (i.e. Array of structures) 2. Network data model Graph 3. Hierarchical data model Trees Source: CoolInterview.com 
India News Network 