Data Structures Interview Questions And Answers

Data Structures interview questions and answers on advance and basic Data Structures with example so this page for both freshers and experienced condidate. Fill the form below we will send the all interview questions on Data Structures also add your Questions if any you have to ask and for apply in Data Structures Tutorials and Training course just send a mail on info@pcds.co.in in detail about your self.

Top Data Structures interview questions and answers for freshers and experienced

What is Data Structures ?

Answer : A data structure is a way of organizing data in a fashion that allows particular properties of that data to be queried and/or updated efficiently

Questions : 1 :: What is data structure?

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 betweendata items allows...View answers

Questions : 2 :: List out the areas in which data structures are applied extensively?

 Compiler Design, Operating System, Database Management System, Statistical analysis package, Numerical Analysis, Graphics, Artificial...View answers

Questions : 3 :: What are the major data structures used in the following areas : RDBMS, Network data model & Hierarchical data model?


RDBMS – Array (i.e. Array of structures) Network data model – Graph Hierarchical data model – Trees

Questions : 4 :: If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

The heterogeneous linked list contains different data types in its nodes and we need alink, pointer to connect them. It is not possible to use ordinary pointers for this. So we go forvoid pointer....View answers

Questions : 5 :: Minimum number of queues needed to implement the priority queue?

Two. One queue is used for actual storing of data and another for storing priorities.

Questions : 6 :: What is the data structures used to perform recursion?


Stack. Because of its LIFO (Last In First Out) property it remembers its ‘caller’ soknows whom to return when the function has to return. Recursion makes use of system stackfor storing...View answers

Questions : 7 :: What are the notations used in Evaluation of Arithmetic Expressions using prefix and postfix forms?

Polish and Reverse Polish notations.

Questions : 8 :: Convert the expression ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations

Prefix Notation:^ - * +ABC - DE + FGPostfix Notation:AB + C * DE - - FG + ^

Questions : 9 :: 9. Sorting is not possible by using which of the following methods?


(a) Insertion(b) Selection(c) Exchange(d) Deletion(d) Deletion.Using insertion we can perform insertion sort, using selection we can performselection sort, using exchange we can perform the bubble...View answers

Questions : 10 :: In an AVL tree, at what condition the balancing is to be done?

If the ‘pivotal value’ (or the ‘Height factor’) is greater than 1 or less than –1.

Questions : 11 :: In RDBMS, what is the efficient data structure used in the internal storage representation?

B+ tree. Because in B+ tree, all the data is stored only in leaf nodes, that makessearching easier. This corresponds to the records that shall be stored in leaf nodes.

Questions : 12 :: Of the following tree structure, which is, efficient considering space and time complexities? (a) Incomplete Binary Tree (b) Complete Binary Tree (c) Full Binary Tree

(b) Complete Binary Tree.By the method of elimination:

Questions : 13 :: Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes?

No.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 minimumspanningtree is...View answers

Questions : 14 :: What is a spanning Tree?

A spanning tree is a tree associated with a network. All the nodes of the graph appearon the tree once. A minimum spanning tree is a spanning tree organized so that the total edgeweight between nodes...View answers

Questions : 15 :: Whether Linked List is linear or Non-linear data structure?

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

Questions : 16 :: How do you search for a target key in a linked list?

To find the target key in a linked list, you have to apply sequential search. Each node is traversed and compared with the target key, and if it is different, then it follows the link to the next...View answers

Questions : 17 :: Briefly explain recursive algorithm.

Recursive algorithm targets a problem by dividing it into smaller, manageable sub-problems. The output of one recursion after processing one sub-problem becomes the input to the next recursive...View answers

Questions : 18 :: What is Fibonacci search?

Fibonacci search is a search algorithm that applies to a sorted array. It makes use of a divide-and-conquer approach that can greatly reduce the time needed in order to reach the target...View answers

Questions : 19 :: What is Huffman's algorithm?

Huffman’s algorithm is associated in creating extended binary trees that has minimum weighted path lengths from the given weights. It makes use of a table that contains frequency of occurrence...View answers

Questions : 20 :: What are doubly linked lists?

Doubly linked lists are a special type of linked list wherein traversal across the data elements can be done in both directions. This is made possible by having two links in every node, one that...View answers

Questions : 21 :: What is an AVL tree?

An AVL tree is a type of binary search tree that is always in a state of partially balanced. The balance is measured as a difference between the heights of the subtrees from the root. This...View answers

Questions : 22 :: Differentiate linear from non linear data structure.

Linear data structure is a structure wherein data elements are adjacent to each other. Examples of linear data structure include arrays, linked lists, stacks and queues. On the other hand, non-linear...View answers

Questions : 23 :: What is a graph?

A graph is one type of data structure that contains a set of ordered pairs. These ordered pairs are also referred to as edges or arcs, and are used to connect nodes where data can be stored and...View answers

Questions : 24 :: How does selection sort work?

Selection sort works by picking the smallest number from the list and placing it at the front. This process is repeated for the second position towards the end of the list. It is the simplest sort...View answers

Questions : 25 :: What are the parts of a linked list?

A linked list typically has two parts: the head and the tail. Between the head and tail lie the actual nodes, with each node being linked in a sequential manner.

Questions : 26 :: What is a bubble sort and how do you perform it?

A bubble sort is one sorting technique that can be applied to data structures such as an array. It works by comparing adjacent elements and exchanges their values if they are out of order. This...View answers

Questions : 27 :: What is a dequeue?

A dequeue is a double-ended queue. This is a structure wherein elements can be inserted or removed from either end.

Questions : 28 :: Give a basic algorithm for searching a binary search tree.

1. if the tree is empty, then the target is not in the tree, end search 2. if the tree is not empty, the target is in the tree 3. check if the target is in the root item 4. if target is not in the...View answers

Questions : 29 :: Differentiate STACK from ARRAY.

Data that is stored in a stack follows a LIFO pattern. This means that data access follows a sequence wherein the last data to be stored will the first one to be extracted. Arrays, on the other hand,...View answers

Questions : 30 :: Which sorting algorithm is considered the fastest?

There are many types of sorting algorithms: quick sort, bubble sort, balloon sort, radix sort, merge sort, etc. Not one can be considered the fastest because each algorithm is designed for a...View answers

Questions : 31 :: What is the minimum number of queues needed when implementing a priority queue?

The minimum number of queues needed in this case is two. One queue is intended for sorting priorities while the other queue is intended for actual storage of data.

Questions : 32 :: What are ARRAYs?

When dealing with arrays, data is stored and retrieved using an index that actually refers to the element number in the data sequence. This means that data can be accessed in any order. In...View answers

Questions : 33 :: Do all declaration statements result in a fixed reservation in memory?

Most declarations do, with the exemption of pointers. Pointer declaration does not allocate memory for data, but for the address of the pointer variable. Actual memory allocation for the data comes...View answers

Questions : 34 :: In what data structures are pointers applied?

Pointers that are used in linked list have various applications in data structure. Data structures that make use of this concept include the Stack, Queue, Linked List and Binary Tree.

Questions : 35 :: What are dynamic data structures?

Dynamic data structures are structures that expand and contract as a program runs. It provides a flexible means of manipulating data because it can adjust according to the size of the data.

Questions : 36 :: What is the minimum number of nodes that a binary tree can have?

A binary tree can have a minimum of zero nodes, which occurs when the nodes have NULL values. Furthermore, a binary tree can also have 1 or 2 nodes.

Questions : 37 :: How do signed and unsigned numbers affect memory?

n the case of signed numbers, the first bit is used to indicate whether positive or negative, which leaves you with one bit short. With unsigned numbers, you have all bits available for that number....View answers

Questions : 38 :: How does a selection sort work for an array?

The selection sort is a fairly intuitive sorting algorithm,, though not necessarily efficient. To perform this, the smallest element is first located and switched with the element at subscript zero,...View answers

Questions : 39 :: What is Data abstraction?

Data abstraction is a powerful tool for breaking down complex data problems into manageable chunks. This is applied by initially specifying the data objects involved and the operations to be...View answers

Questions : 40 :: What is a postfix expression?

A postfix expression is an expression in which each operator follows its operands. The advantage of this form is that there is no need to group sub-expressions in parentheses or to consider operator...View answers

Questions : 41 :: What is the advantage of the heap over a stack?

Basically, the heap is more flexible than the stack. That’s because memory space for the heap can be dynamically allocated and de-allocated as needed. However, memory of the heap can at times...View answers

Questions : 42 :: How does variable declaration affect memory allocation?

The amount of memory to be allocated or reserved would depend on the data type of the variable being declared. For example, if a variable is declared to be of integer type, then 32 bits of memory...View answers

Questions : 43 :: What is a linear search?

A linear search refers to the way a target key is being searched in a sequential data structure. Using this method, each element in the list is checked and compared against the target key, and is...View answers

Questions : 44 :: What is the difference between a PUSH and a POP?

Pushing and popping applies to the way data is stored and retrieved in a stack. A push denotes data being added to it, meaning data is being “pushed” into the stack. On the other hand, a...View answers

Questions : 45 :: What is the primary advantage of a linked list?

A linked list is a very ideal data structure because it can be modified easily. This means that modifying a linked list works regardless of how many elements are in the list.

Questions : 46 :: Differentiate NULL and VOID.

Null is actually a value, whereas Void is a data type identifier. A variable that is given a Null value simply indicates an empty value. Void is used to identify pointers as having no initial...View answers

Questions : 47 :: What is merge sort?

Merge sort takes a divide-and-conquer approach to sorting data. In a sequence of data, adjacent ones are merged and sorted to create bigger sorted lists. These sorted lists are then merged again to...View answers

Questions : 48 :: What is an ordered list?

An ordered list is a list in which each node’s position in the list is determined by the value of its key component, so that the key values form an increasing sequence, as the list is...View answers

Questions : 49 :: What is FIFO?

FIFO is short for First-in, First-out, and is used to represent how data is accessed in a queue. Data has been inserted into the queue list the longest is the one that is removed first.

Questions : 50 :: How does dynamic memory allocation help in managing data?

Aside from being able to store simple structured data types, dynamic memory allocation can combine separately allocated structured blocks to form composite structures that expand and contract as...View answers

Questions : 51 :: Are linked lists considered linear or non-linear data structure?

It actually depends on where you intend to apply linked lists. If you based it on storage, a linked list is considered non-linear. On the other hand, if you based it on access strategies, then a...View answers

Questions : 52 :: What are multidimensional arrays?

Multidimensional arrays make use of multiple indexes to store data. It is useful when storing data that cannot be represented using a single dimensional indexing, such as data representation in a...View answers

Questions : 53 :: Explain Binary Search Tree

A binary search tree stores data in such a way that they can be retrieved very efficiently. The left subtree contains nodes whose keys are less than the node’s key value, while the right...View answers
More Question

Ask your interview questions on Data Structures

Write Your comment or Questions if you want the answers on Data Structures from Data Structures Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 






--------- Tutorials ---