Data Structures Interview Questions with Answers

Data Structures Interview Questions with Answers 2021

Computer Programming Quiz IT Jobs Quiz

Data Structures Interview Questions with Answers 2021

What is a Data Structure? · What are linear and non-linear data Structures? DSA Interview Questions · What is data-structure? · What are various data-​structures available? · What is algorithm? ·Coding interviews are an important part of various software … Data Structures for a Coding Interview and associated common questions .

Q1.A circular linked list can be used for

A. Stack

B. Queue

C. Both Stack & Queue

D. Neither Stack or Queue

Option C – Both Stack & Queue

Q2.Visiting root node after visiting left and right sub-trees is called

A. In-order Traversal

B. Pre-order Traversal

C. Post-order Traveral

Option C – Post-order Traveral

Q3.Which of the following is not possible with an array in C programming langauge −

A. Declaration

B. Definition

C. Dynamic Allocation

D . Array of strings

Option C – Dynamic Allocation

Q4.Apriori analysis of an algorithm assumes that −

A . the algorithm has been tested before in real environment.

B . all other factors like CPU speed are constant and have no effect on implementation.

C . the algorithm needs not to be practical.

D . none of the above.

Option B – all other factors like CPU speed are constant and have no effect on implementation.

Q5.Which if the following is/are the levels of implementation of data structure

A) Abstract level
B) Application level
C) Implementation level
D) All of the above

Option D – All of the above

Q6.which of the following is true about the characteristics of abstract data types?
i) It exports a type.
ii) It exports a set of operations

A) True, False
B) False, True
C) True, True
D) False, False

Option C – True, True

Q7.Which data structure allows deleting data elements from and inserting at rear?

A) Stacks
B) Queues
C) Dequeues
D) Binary search tree

Option B – Queues

Q8.A ……. is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.

A) Queue linked list
B) Stacks linked list
C) Both of them
D) Neither of them

Option A – Queue linked list

Q9.Herder node is used as sentinel in …..

A) Graphs
B) Stacks
C) Binary tree
D) Queues

Option C – Binary tree

Q10.Which of the following data structure is non linear type?

A) Strings
B) Lists
C) Stacks
D) Graph

Option D – Graph

Q11.Which of the following data structure is linear type?

A) Graph
B) Trees
C) Binary tree
D) Stack

Option D – Stack

Q12.A directed graph is ………………. if there is a path from each vertex to every other vertex in the digraph.

A) Weakly connected
B) Strongly Connected
C) Tightly Connected
D) Linearly Connected

Option B – Strongly Connected

Q13.In general, the binary search method needs no more than ……………. comparisons.

A) [log2n]-1
B) [logn]+1
C) [log2n]
D) [log2n]+1

Option D – [log2n]+1

Q14.A graph is a collection of nodes, called ………. And line segments called arcs or ……….. that connect pair of nodes.

A) vertices, edges
B) edges, vertices
C) vertices, paths
D) graph node, edges

Option A – vertices, edges

Q15.There is an extra element at the head of the list called a ……….

A) Antinel
B) Sentinel
C) List header
D) List head

Option B – Sentinel

Q16.A graph is said to be ……………… if the vertices can be split into two sets V1 and V2 such there are no edges between two vertices of V1 or two vertices of V2.

A) Partite
B) Bipartite
C) Rooted
D) Bisects

Option B – Bipartite

Q17.The number of comparisons done by sequential search is ………………

A) (N/2)+1
B) (N+1)/2
C) (N-1)/2
D) (N+2)/2

Option B – (N+1)/2

Q18.Which of the following statement is false?

A. Arrays are dense lists and static data structure.
B. Data elements in linked list need not be stored in adjacent space in memory
C. Pointers store the next data element of a list.
D. Linked lists are collection of the nodes that contain information part and next pointer.

Option C – Pointers store the next data element of a list.

Q19.Which of the following are the operations applicable an primitive data structures?

A. create
B. destroy
C. update
D. all of the above

Option D – all of the above

Q20.Operations on a data structure may be …..

A. creation
B. destruction
C. selection
D. all of the above

Option D – all of the above

Q21.The logical or mathematical model of a particular organization of data is called a ………

A) Data structure
B) Data arrangement
C) Data configuration
D) Data formation

Option A – Data structure

Q22.The simplest type of data structure is ………………

A) Multidimensional array
B) Linear array
C) Two-dimensional array
D) Three-dimensional array

Option B – Linear array

Q23.Each node in a linked list has two pairs of ………….. and ……………….

A) Link field and information field
B) Link field and avail field
C) Avail field and information field
D) Address field and link field

Option A – Link field and information field

Q24.When does top value of the stack changes?

A) Before deletion
B) While checking underflow
C) At the time of deletion
D) After deletion

Option D – After deletion

Q25.Which of the following data structures are indexed structures?

A) Linear arrays
B) Linked lists
C) Graphs
D) Trees

Option A – Linear arrays

Leave a Reply

Your email address will not be published. Required fields are marked *