[go: up one dir, main page]

0% found this document useful (0 votes)
31 views20 pages

Data Structures

The document discusses various data structures and algorithms. It contains multiple choice questions about topics like arrays, stacks, queues, linked lists, trees, sorting algorithms (bubble sort, merge sort, quicksort), searching algorithms (linear search), complexity analysis and more. Each question is followed by an answer key. The document seems to be assessing understanding of fundamental data structures and algorithms concepts.

Uploaded by

hema mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views20 pages

Data Structures

The document discusses various data structures and algorithms. It contains multiple choice questions about topics like arrays, stacks, queues, linked lists, trees, sorting algorithms (bubble sort, merge sort, quicksort), searching algorithms (linear search), complexity analysis and more. Each question is followed by an answer key. The document seems to be assessing understanding of fundamental data structures and algorithms concepts.

Uploaded by

hema mishra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Data Structures

1. ……. contains the information about an array used in a program.


(A) Dope vector
(B) Record
(C) Table
(D) None of the above

Answer
(A) Dope vector

2.The term DEQUE refers……


(A) single ended queue
(B) double ended queue
(C) Both (A) & (B)
(D) None of the above

Answer
(B) double ended queue

3.A sort that compares each element with its adjacent element in a list is called…..
(A) Bubble Sort
(B) Insertion Sort
(C) Quick Sort
(D) Heap Sort

Answer
(A) Bubble Sort

4.Which of the following data structure is required to evaluate a post fix expression
(A) Stack
(B) linked list
(C) Array
(D) None of the above

Answer
(A) Stack

5.A linked list that has no beginning and no end is called…..


(A) Doubly linked list
(B) Singly linked list
(C) Circular linked list
(D) None of the above
Answer
(C) Circular linked list

6.In order traversal is also known as……


(A) Pre order
(B) Symmetric order
(C) End order
(D) None of the above

Answer
(B) Symmetric order

7.A matrix in which number of zero elements are much higher than the number of non zero elements is
called
(A) Scalar Matrix
(B) Identity Matrix
(C) Sparse Matrix
(D) None of the above

Answer
(C) Sparse Matrix

8.Which of the following is the slowest sorting algorithm


(A) Heap Sort
(B) Insertion Sort
(C) Quick Sort
(D) Bubble Sort

Answer
(D) Bubble Sort

9.The smallest element of an Array’s index is known as…..


(A) Range
(B) Upper bound
(C) Lower bound
(D) None of the above

Answer
(C) Lower bound

10.Which data structure is required to check balanced parenthesis in an expression


(A) Linked List
(B) Queue
(C) Tree
(D) Stack

Answer
(D) Stack

In Queue, the elements added at…..end


(A) front
(B) rear
(C) top
(D) base

Answer
(B) rear

2.The terms “POP” and “PUSH” are related to…..


(A) queue
(B) stack
(C) linked list
(D) None of the above

Answer
(B) stack

3.Stack is also called a …….


(A) Last In First Out
(B) First In First Out
(C) LIFO & FIFO
(D) None of the above

Answer
(A) Last In First Out

4.The largest element of an Array Index is called……


(A) Range
(B) Upper bound
(C) lower bound
(D) None of the above

Answer
(B) Upper bound

5.The memory address of the first element of an array is called…


(A) first address
(B) floor address
(C) base address
(D) None of the above

Answer
(C) base address

6.The complexity of shell sort is


(A) O(log)
(B) O(n^2)
(C) O(n (log n)^2)
(D) None of the above

Answer
(C) O(n (log n)^2)

7.Which of the following is a linear data structure


(A) Array
(B) Graph
(C) Tree
(D) None of the above

Answer
(A) Array

8.….. is a technique to convert a range of key values into a range of Indices of an Array
(A) Thrashing
(B) Hashing
(C) Interpolation
(D) None of the above

Answer
(B) Hashing

9.……. is a queue with limited number of elements.


(A) Bounded queue
(B) Unbounded queue
(C) Both (A) & (B)
(D) None of the above

Answer
(A) Bounded queue

10.An odd-even sort is also called……


(A) Bubble Sort
(B) Heap Sort
(C) Quick Sort
(D) Brick Sort

Answer
(D) Brick Sort

The term “PUSH” is used to …… an element into a stack


(A) Update
(B) Edit
(C) Insert
(D) None of the above

Answer
(C) Insert

2.The condition “FRONT = NULL” represents that the queue is…..


(A) Overflow
(B) Empty
(C) Full
(D) None of the above

Answer
(B) Empty

3.A linked list is also called


(A) One way list
(B) Multi way list
(C) Single way list
(D) None of the above

Answer
(A) One way list

4.Which data structure represents hierarchical relationship between various elements


(A) Linked List
(B) Tree
(C) Array
(D) None of the above

Answer
(B) Tree

5.The process of accessing data stored in a tape is similar to handle data on…….
(A) Linked List
(B) Tree
(C) Array
(D) Queue

Answer
(D) Queue

6.Which of the following search start at the beginning of the list and each element in the list
(A) Linear Search
(B) Binary Tree Search
(C) Hash Search
(D) None of the above

Answer
(A) Linear Search

7.In Binary Tree Traversal, the node is visited between the sub trees is called……
(A) Pre-order traversal
(B) In-order traversal
(C) Post-order traversal
(D) None of the above

Answer
(B) In-order traversal

8.Which of the following data structure is indexed data structure


(A) Linked List
(B) Stack
(C) Queue
(D) Linear Array

Answer
(D) Linear Array

9.…….. is a data structure in which each node has at most two children.
(A) Red-Black Tree
(B) Binary Tree
(C) AVL Tree
(D) None of the above

Answer
(B) Binary Tree

10.Which of the following sorting algorithm is not an internal sort


(A) Bubble Sort
(B) Insertion Sort
(C) Merge Sort
(D) Heap Sort

Answer
(C) Merge Sort

Print Server uses ….. which is a buffer that holds data before it is send to the printer
(A) Queue
(B) Stack
(C) Spool
(D) None of the above

Answer
(C) Spool

2.…… is a balanced binary search tree in which the difference between the height of any node’s left and
right sub tree is at most one.
(A) AVL Tree
(B) Red-Black Tree
(C) 2-3-4 Tree
(D) None of the above

Answer
(A) AVL Tree

3.Enqueue means to insert an item into the ……. of the Queue


(A) front
(B) rear
(C) middle
(D) None of the above

Answer
(B) rear

4.The process of deleting an element from the top of stack is called ….. operation
(A) POP
(B) PUSH
(C) Both (A) & (B)
(D) None of the above

Answer
(A) POP

5.Merge Sort is based on ……..


(A) Greedy approach
(B) Backtracking algorithm
(C) Divide and Conquer method
(D) None of the above

Answer
(C) Divide and Conquer method

6.Post order traversal is also known as……


(A) depth-first order
(B) end order
(C) symmetric order
(D) None of the above
Answer
(B) end order

7.A queue is a ……. data structure


(A) Last In First Out (LIFO)
(B) Linear Array
(C) First In First Out (FIFO)
(D) None of the above

Answer
(C) First In First Out (FIFO)

8.Which of the following data structure stores homogeneous data elements


(A) Record
(B) Pointer
(C) Linear Array
(D) None of the above

Answer
(C) Linear Array

9.An algorithm that calls itself directly or indirectly is called ……


(A) Iteration
(B) Recursion
(C) Traversal
(D) None of the above

Answer
(B) Recursion

10.Which of the following is used to find the location of an element with a given value
(A) Search
(B) Iteration
(C) Traversal
(D) None of the above

Answer
(A) Search

The complexity of Bubble sort algorithm is ………


(A) O (log n)
(B) O (n log n)
(C) O (n^2)
(D) None of the above

Answer
(C) O (n^2)

2.Which of the following data structure stores heterogeneous data elements


(A) Record
(B) Pointer
(C) Linear Array
(D) None of the above

Answer
(A) Record

3.……. is required for languages that support dynamic data structure.


(A) Stack allocation
(B) Static allocation
(C) Heap allocation
(D) None of the above

Answer
(C) Heap allocation

4.In Binary Tree Traversal, the node is visited before its left and right sub trees is called…….
(A) pre order
(B) In order
(C) post order
(D) None of the above

Answer
(A) pre order

5.Which of the following is non linear data structure


(A) Stack
(B) Tree
(C) Queue
(D) None of the above
Answer
(B) Tree

6.Which algorithm solves the all pairs shortest path problem


(A) Floyd’s algorithm
(B) Prim’s algorithm
(C) Both (A) & (B)
(D) None of the above

Answer
(A) Floyd’s algorithm

7.Pre order traversal is also known as …….


(A) depth-first order
(B) end order
(C) symmetric order
(D) None of the above

Answer
(A) depth-first order

8.Queues can be used to implement ……


(A) recursion
(B) quick sort
(C) radix sort
(D) None of the above

Answer
(C) radix sort

9.…… is a header list in which the last node contains the null pointer.
(A) Circular Header list
(B) Grounded Header list
(C) Both (A) & (B)
(D) None of the above

Answer
(B) Grounded Header list

10.Quick sort is also called …….


(A) Partition exchange sort
(B) Diminishing increment sort
(C) Both (A) & (B)
(D) None of the above

Answer
(A) Partition exchange sort

Linear search is also called …….


(A) Interpolation Search
(B) Transpose Sequential Search
(C) Sequential Search
(D) None of the above

Answer
(C) Sequential Search

2.The Array as an Abstract Data Type (ADT) supports ….. operations.


(A) Store
(B) Retrieve
(C) Both (A) & (B)
(D) None of the above

Answer
(C) Both (A) & (B)

3.Each position of the hash table is called ……


(A) Bucket
(B) Entry
(C) Cell
(D) Slot

Answer
(D) Slot

4.The common way of keeping subsequent items within the table and computing possible positions is
termed as …………
(A) Direct Chaining
(B) Open Addressing
(C) Both (A) & (B)
(D) None of the above
Answer
(B) Open Addressing

5.An extra key inserted at the end of an Array is known as………


(A) Sentinel
(B) Stop key
(C) Both (A) & (B)
(D) None of the above

Answer
(A) Sentinel

6.In Binary Tree Traversal, the node is visited after both trees is called…….
(A) pre order
(B) In order
(C) post order
(D) None of the above

Answer
(C) post order

7.Shell Sort is also called …….


(A) Partition exchange sort
(B) Diminishing increment sort
(C) Both (A) & (B)
(D) None of the above

Answer
(B) Diminishing increment sort

8.The complexity of Merge sort algorithm is………


(A) O (log n)
(B) O (n log n)
(C) O (n^2)
(D) None of the above

Answer
(B) O (n log n)

9.…… is a header list in which the last node points back to the header node.
(A) Circular Header linked list
(B) Grounded Header linked list
(C) Both (A) & (B)
(D) None of the above

Answer
(A) Circular Header linked list

10.A pointer that contains the address of a heap-dynamic variable is called …..
(A) Dangling pointer
(B) Null pointer
(C) Void pointer
(D) None of the above

Answer
(A) Dangling pointer

The performance of an algorithm is measured on the basis of_______


(A) Time Complexity
(B) Space Complexity
(C) Both (A) & (B)
(D) None of the above

Answer
(C) Both (A) & (B)

2.A set of functions that grow slower than or at the same rate as expression is represented by_____
(A) Big Omega notation
(B) Theta notation
(C) Big O notation
(D) None of the above

Answer
(C) Big O notation

3.The average time complexity of Insertion sort algorithm is________


(A) O (n^2)
(B) O (n log n)
(C) O (n)
(D) None of the above
Answer
(A) O (n^2)

4.Which of the following is not a stable sort


(A) Insertion Sort
(B) Heap Sort
(C) Merge Sort
(D) None of the above

Answer
(B) Heap Sort

5.The space required to store the values of all the constants and variables is called_______
(A) Instruction space
(B) Data Space
(C) Environment Space
(D) None of the above

Answer
(B) Data Space

6.In Heap data structure, If the parent nodes are greater than their children nodes then it is called
__________
(A) Max-Heap
(B) Min-Heap
(C) Both (A) & (B)
(D) None of the above

Answer
(A) Max-Heap

7.The Quick sort algorithm divides the list into ______ main parts
(A) Four
(B) Six
(C) Five
(D) Three

Answer
(D) Three
8.Circular linked list can also be used to create _____
(A) Priority Queue
(B) Double ended Queue
(C) Circular queue
(D) None of the above

Answer
(C) Circular queue

9.Which of the following is/are real-time application(s) of Queue


(A) Printer
(B) CPU task scheduling
(C) Interrupts handling in real-time systems
(D) All of the above

Answer
(D) All of the above

10.Linked Lists are used to implement______


(A) Stacks
(B) Graphs
(C) Queues
(D) All of the above

Answer
(D) All of the above

In linked list, an element can be inserted at _______


(A) beginning of the list
(B) end of the list
(C) middle of the list
(D) Both (A) & (B)

Answer
(D) Both (A) & (B)

2.Which of the following is/are real time application(s) of Circular linked list
(A) Printer
(B) Multi player games
(C) Interrupts handling in real-time systems
(D) All of the above
Answer
(B) Multi player games

3.Stack is also called______


(A) Pop up array
(B) Pop down list
(C) Push down list
(D) None of the above

Answer
(C) Push down list

4.Prim’s algorithm is a ________


(A) Greedy algorithm
(B) Backtracking algorithm
(C) Divide and Conquer method
(D) None of the above

Answer
(A) Greedy algorithm

5.A heap allows a very efficient implementation of a _______


(A) Stack
(B) Tree
(C) priority queue
(D) None of the above

Answer
(C) priority queue

6.________is an algorithm that builds a solution by repeated selecting the cheapest among all options at
each stage.
(A) Greedy algorithm
(B) Backtracking algorithm
(C) Divide and Conquer method
(D) None of the above

Answer
(A) Greedy algorithm
7.The Complexity of Quick Sort algorithm is ______
(A) O (n^2)
(B) O (n log n)
(C) O (n)
(D) None of the above

Answer
(B) O (n log n)

8.The best average behaviour is shown by________


(A) Heap Sort
(B) Insertion Sort
(C) Quick Sort
(D) Bubble Sort

Answer
(C) Quick Sort

9.A mathematical-model of user defined type along with the collection of all operations defined on that
model is known as ______
(A) Data Structure
(B) Primitive Data Type
(C) Algorithm
(D) Abstract Data Type

Answer
(D) Abstract Data Type

10.In ________ traversal we can convert a binary tree into its mirror image.
(A) In order
(B) Pre order
(C) Post order
(D) None of the above

Answer
(C) Post order

A postfix expression is merely the _____ of the prefix expression.


(A) Forward
(B) Reverse
(C) Inverse
(D) None of the above

Answer
(B) Reverse

2.Which of the following begins the search with the element that is located in the middle of the Array
(A) Random Search
(B) Parallel Search
(C) Binary Search
(D) Serial Search

Answer
(D) Serial Search

3.In a Circular linked list, insertion of a record involves the modification of____
(A) 1 Pointer
(B) 2 Pointer
(C) 3 Pointer
(D) None of the above

Answer
(B) 2 Pointer

4.Which of the following is useful in traversing a given graph by breadth first search
(A) Stack
(B) List
(C) Queue
(D) None of the above

Answer
(C) Queue

5.A characteristic of the data that binary search uses but linear search ignores is______
(A) Order of the list
(B) length of the list
(C) Both (A) & (B)
(D) None of the above
Answer
(A) Order of the list
6.A sort which iteratively passes through a list to exchange the first element with any element less than
it and then repeats with a new first element is called__________
(A) Heap Sort
(B) Quick Sort
(C) Selection Sort
(D) None of the above

Answer
(C) Selection Sort

7.To insert a node in a circular list at rear position, it should be inserted at ______ of the Queue.
(A) Front – 1 position
(B) Rear position
(C) Front position
(D) None of the above

Answer
(C) Front position

8.In an extended-binary tree, the nodes with two children are called ……..
(A) Interior node
(B) Domestic node
(C) Internal node
(D) Inner node

Answer
(C) Internal node

9.A terminal node in a binary tree is called ______


(A) Child
(B) Leaf
(C) Branch
(D) None of the above

Answer
(B) Leaf

10.Sequential representation of binary tree uses ______


(A) Three dimensional arrays
(B) Array with pointers
(C) Two dimensional arrays
(D) None of the above

Answer
(B) Array with pointers

You might also like