Almost all MCQs of Computer

Solved MCQs on Data structures and Algorithms


MCQs on Data structures and Algorithms
Data structures and Algorithms MCQs


Q No.1 of 10

Identify the data structure which allows deletions at both ends of the list but insertion at only one end.
Option 1
Priority queues
Option 2
Output-restricted deque
Option 3
Input-restricted deque

Correct
Option 4
None of these
Q No.2 of 10

The depth of a complete binary tree is given by
Option 1
Dn = n log2n+1
Option 2
Dn = n log2n
Option 3
Dn = log2n+1

Correct
Option 4
Dn = log2n
Q No.3 of 10

The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal
Option 1
ABFCDE
Option 2
ADBFEC
Option 3
ABDCEF
Option 4
ABDECF

Correct
Q No.4 of 10

In a binary tree, certain null entries are replaced by special pointers which point to nodes higher in the tree for efficiency. These special pointers are called
Option 1
thread

Correct
Option 2
path
Option 3
branch
Option 4
leaf
Q No.5 of 10

Arrays are best data structures
Option 1
for the size of the structure and the data in the structure are constantly changing
Option 2
for relatively permanent collections of data

Correct
Option 3
None of these
Option 4
All of these
Q No.6 of 10

Each array declaration need not give, implicitly or explicitly, the information about
Option 1
the index set of the array
Option 2
the name of array
Option 3
the data type of array
Option 4
the first data from the set to be stored

Correct
Q No.7 of 10

The time factor when determining the efficiency of algorithm is measured by
Option 1
Counting the number of statements
Option 2
Counting micro seconds 
Option 3
Counting the number of key operations

Correct
Option 4
Counting the kilobytes of algorithm
Q No.8 of 10

Which of the following case does not exist in complexity theory
Option 1
Average case
Option 2
Null case

Correct
Option 3
Best case
Option 4
Worst case
Q No.9 of 10

. The Worst case occur in linear search algorithm when____.
Option 1
Item is somewhere in the middle of the array
Option 2
Item is the last element in the array or is not there at all

Correct
Option 3
Item is the last element in the array
Option 4
Item is not in the array at all
Q No.10 of 10

The complexity of Binary search algorithm is
Option 1
O(n)

Correct
Option 2
O(log )
Option 3
O(n log n)
Option 4
O(n2)



MCQs on Data structures and Algorithms II


Data structures and Algorithms MCQs and Quiz


Q No.1 of 10

Which of the following data structure is not linear data structure?
Option 1
Linked lists
Option 2
Arrays
Option 3
None of these

Correct
Option 4
Both of these
Q No.2 of 10

Finding the location of the element with a given value is:
Option 1
Sort
Option 2
Traversal
Option 3
Search

Correct
Option 4
None of above
Q No.3 of 10

To represent hierarchical relationship between elements, which data structure is suitable?
Option 1
Priority
Option 2
Deque
Option 3
Tree

Correct
Option 4
All of these
Q No.4 of 10

The in order traversal of tree will yield a sorted listing of elements of tree in
Option 1
Binary trees
Option 2
Heaps
Option 3
Binary search trees

Correct
Option 4
None of these
Q No.5 of 10

If every node u in G is adjacent to every other node v in G, A graph is said to be
Option 1
finite
Option 2
isolated
Option 3
complete

Correct
Option 4
strongly connected
Q No.6 of 10

Which of the following data structure is non-linear type?
Option 1
Strings
Option 2
Lists
Option 3
Stacks
Option 4
None of these

Correct
Q No.7 of 10

Which data structure allows deleting data elements from front and inserting at rear?
Option 1
Queues

Correct
Option 2
Stacks
Option 3
Deques
Option 4
Binary search tree
Q No.8 of 10

In a graph if e=(u, v) means
Option 1
e begins at u and ends at v
Option 2
u is processor and v is successor
Option 3
All of these

Correct
Option 4
None of these
Q No.9 of 10

If every node u in G is adjacent to every other node v in G, A graph is said to be
Option 1
finite
Option 2
isolated
Option 3
complete

Correct
Option 4
strongly connected

Q No.10 of 10

The complexity of Binary search algorithm is
Option 1
O(n)
Option 2
O(log n)

Correct
Option 3
O(n2)
Option 4
O(n log n)
Solved MCQs on Data structures and Algorithms III

Data structures and Algorithms MCQs and Quiz


Q No.1 of 10

The complexity of Bubble sort algorithm is
Option 1
O(n)
Option 2
O(n2)

Correct
Option 3
O(log n)
Option 4
O(n log n)
Q No.2 of 10

The indirect change of the values of a variable in one module by another module is called
Option 1
internal change
Option 2
inter-module change
Option 3
side effect

Correct
Option 4
side-module update
Q No.3 of 10

Which of the following data structure is linear data structure?
Option 1
Arrays

Correct
Option 2
Trees
Option 3
Graphs
Option 4
None of these
Q No.4 of 10

To represent hierarchical relationship between elements, which data structure is suitable?
Option 1
Deque
Option 2
Priority
Option 3
Tree

Correct
Option 4
None of these
Q No.5 of 10

Which of the following data structure is linear type?
Option 1
Strings
Option 2
Lists
Option 3
Queues
Option 4
All of these

Correct
Q No.6 of 10

A binary tree whose every node has either zero or two children is called____________.
Option 1
Complete binary tree
Option 2
Binary search tree
Option 3
Extended binary tree

Correct
Option 4
None of these
Q No.7 of 10

When representing any algebraic expression E which uses only binary operations in a 2-tree
Option 1
the variables and operations in E will appear only in internal nodes
Option 2
. the operations in E will appear as external nodes and variables in internal nodes
Option 3
the variable in E will appear as external nodes and operations in internal nodes

Correct
Option 4
. the variables and operations in E will appear only in external nodes
Q No.8 of 10

When converting binary tree into extended binary tree, all the original nodes in binary tree are
Option 1
external nodes on extended tree
Option 2
internal nodes on extended tree

Correct
Option 3
vanished on extended tree
Option 4
None of these
Q No.9 of 10

An algorithm that calls itself directly or indirectly is known as
Option 1
Polish notation
Option 2
Recursion

Correct
Option 3
Sub algorithm
Option 4
Traversal algorithm

Q No.10 of 10

Which of the following sorting algorithm is of divide-and-conquer type?
Option 1
Bubble sort
Option 2
Insertion sort
Option 3
Quick sort

Correct
Option 4
None of these
MCQs on Data structures and Algorithms
Data structures and Algorithms MCQs and Quiz

Q No.1 of 10

.  In a graph if e=[u, v], Then u and v are called
Option 1
neighbors
Option 2
endpoints of e
Option 3
adjacent nodes
Option 4

All of these
Q No.2 of 10

In a Heap tree:
Option 1
Values in a node is greater than every value in children of it
Option 2
Values in a node is greater than every value in left sub tree and smaller than right sub tree
Option 3
Both of these
Option 4
None of these
Q No.3 of 10

A connected graph T without any cycles is called
Option 1
a tree graph
Option 2
a tree
Option 3
free tree
Option 4
All of these
Q No.4 of 10

A binary tree can easily be converted into q 2-tree
Option 1
by inserting an internal nodes for non-empty node
Option 2
by replacing each empty sub tree by a new internal node
Option 3
by inserting an external nodes for non-empty node
Option 4
by replacing each empty sub tree by a new external node
Q No.5 of 10

Which of the following data structure is non-linear type?
Option 1
Strings
Option 2
Lists
Option 3
Stacks
Option 4
none of these
Q No.6 of 10

The depth of a complete binary tree is given by
Option 1
Dn = n log2n
Option 2
Dn = n log2n+1
Option 3
Dn = log2n
Option 4
Dn = log2n+1
Q No.7 of 10

memory address of the first element of an array is called
Option 1
floor address
Option 2
first address
Option 3
foundation address
Option 4
base address
Q No.8 of 10

The memory address of fifth element of an array can be calculated by the formula
Option 1
LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array
Option 2
LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array
Option 3
LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array
Option 4
None of these
Q No.9 of 10

Which of the following is not a limitation of binary search algorithm?
Option 1
must use a sorted array
Option 2
requirement of sorted array is expensive when a lot of insertion and deletions are needed
Option 3
there must be a mechanism to access middle element directly
Option 4
binary search algorithm is not efficient when the data elements are more than 1000
Q No.10 of 10

Two dimensional arrays are also called
Option 1
tables arrays
Option 2
matrix arrays
Option 3
Both of these
Option 4
None of these

[facebook]

MKRdezign

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget