• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

Data structure Interview Questions Answers

Question - 11 : - What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model.

Answer - 11 : - 1. RDBMS Array (i.e. Array of structures) 2. Network data model Graph 3. Hierarchical data model Trees.

Question - 12 : - Why is the isEmpty() member method called?

Answer - 12 : - The isEmpty() member method is called within the dequeue process to determine if there is an item in the queue to be removed i.e. isEmpty() is called to decide whether the queue has at least one element. This method is called by the dequeue() method before returning the front element.

Question - 13 : - How many different trees are possible with 10 nodes ?

Answer - 13 : - 1014 - For example, consider a tree with 3 nodes(n=3), it will have the maximum combination of 5 different (ie, 23 - 3 =? 5) trees.

Question - 14 : - What does each entry in the Link List called?

Answer - 14 : - Each entry in a linked list is called a node. Think of a node as an entry that has three sub entries. One sub entry contains the data, which may be one attribute or many attributes. Another points to the previous node, and the last points to the next node. When you enter a new item on a linked list, you allocate the new node and then set the pointers to previous and next nodes.

Question - 15 : - How is the front of the queue calculated ?

Answer - 15 : - The front of the queue is calculated by front = (front+1) % size.

Question - 16 : - What is data structure?

Answer - 16 : - A data structure is a way of organizing data that considers not only the items stored, but also their relationship to each other. Advance knowledge about the relationship between data items allows designing of efficient algorithms for the manipulation of data.

Question - 17 : - What method is used to place a value onto the top of a stack?

Answer - 17 : - push() method, Push is the direction that data is being added to the stack. push() member method places a value onto the top of a stack.

Question - 18 : - In an AVL tree, at what condition the balancing is to be done?

Answer - 18 : - If the pivotal value (or the Height factor) is greater than 1 or less than 1.

Question - 19 : - Whether Linked List is linear or Non-linear data structure?

Answer - 19 : - According to Access strategies Linked list is a linear one. According to Storage Linked List is a Non-linear one.

Question - 20 : - What is a node class?

Answer - 20 : - A node class is a class that, relies on the base class for services and  implementation, provides a wider interface to users than its base class, relies primarily on virtual functions in its public interface depends on all its direct and indirect base class can be understood only in the context of the base class can be used as base for further derivation can be used to create objects. A node class is a class that has added new services or functionality beyond the services inherited from its base class.

Computer Contributors

krishan
Rajeev Katiyar
Yes Baroda

Share your email for latest updates

Name:
Email:

Our partners