Professional Documents
Culture Documents
MCQ DS
MCQ DS
ect
Answer Answer Number Answer Answer Answ
Question
Number 1 2 Number 3 Number 4 er
Num
ber
The amount of
Multiple other
memory to be Elements of an Elements are
data structures
What is the disadvantage of an array allocated array can be stored in
can be 1
data structure? should be accessed in contiguous
implemented
known constant time. memory blocks.
using arrays.
beforehand.
What will be the time complexity to insert
an element at the begining of an array of O(1) O(logN) O(N) None of these 3
N elements?
A data type
that is defined
by its
A data type that A data type that
behaviour
What is an abstract data type (ADT)? is defined by its is defined by its None of these 1
from the point
implementation. size.
of view of a
user of the
data.
Which asymptotic notation represents the
worst-case time complexity of an O(n) Ω(n) O(n log n) O(n^2) 4
algorithm?
What does the notation O(log n) signify in Linear time Quadratic time Logarithmic Exponential
3
terms of time complexity? complexity complexity time complexity time complexity
It maintains It doesn't
the relative maintain the
Predict the meaning of stable sort. None of these 1
order of relative order of
It randomly
duplicate keys duplicate keys
shuffles the
duplicate keys
before sorting
them
Choose the example of stable sort Radix sort Selection sort Merge sort Quick sort 3
Choose the time complexity of merge
O(nlogn) O(logn) O(n) O(n^2) 1
sort
Choose which one of the following is
Merge sort Selection sort Bubble Sort Insertion sort 1
not a example of in place sort .
Element not
present in the
Element Element present Element
array or
Identify the worst case situation(s) for present in the in the middle present in the
Element 4
the linear search technique. first position position of the second position
present in the
of the array array of the array
last position of
the array
Choose the correct option from the
following: "In binary search the array Sorted Unsorted Random None of these 1
must the be in"
Choose the best case time complexity
O(1) O(n) O(n2) O(logn) 1
of linear search
Choose the average number of key
None of the
comparison is required for a sucessful n/2 (n-1)/2 (n+1)/2 3
these
search for linear search
Given an array arr={12,13,35,56,78}.
Determine the number of
3 2 1 5 2
comparisons needed to search 56
using Binary search algorithm.
Determine the evaluated result of the
evaluated result of the following post 2 3 0 3.17 1
fix operation: 3,5,7,*,+,12,% is
In a binary search tree, if the number
of nodes of a tree is 9 then select the 9 5 4 None of these 3
minimum height of the tree is
Select from the following:- A vertex
with degree one in a graph is Leaf Pendant Vertex End Vertex None of these 2
called______.
The Ackerman function for all non-
negative values of m and n is
recursively defined as A(m,n) =
i) n+1 , if m=0
4 3 5 2 1
ii) A(m-1, 1) , if m!=0 and n=0
iii) A(m-1, A(m,n-1)) if m!=0, n!=0
Therefore, determine the value of
A(1,2).
In an array representation of binary
2 3 4 5 2
tree, if the index number of the child
node is 6, then select the index
number of its parent node.
Which of the following data structure
Array Stack Queue Linked list 2
is used to implement recursion?
Choose the equivalent postfix
expression for the follwing infix defbc/++* def+/bc+* def+/bc*+ None of these 3
expression: d/(e+f)+b*c.
Choose the postfix expression for the
ab+cd-* abcd+-* ab+cd*- ab+-cd* 1
following prefix expression:*+ab-cd.
Which one of the following is
identified as the degree of a leaf 3
node? 1 2 0 more than 0
Identify the maximum number of
nodes possible in a binary tree of 11 10 15 16 3
height 4.
Choose the correct answer: to search
an item in Binary search tree,average O(nlogn) O(n) O(n*n) O(logn) 4
case time complexity is______.
Which one of the following is
identified as anon-linear data Array Stack Tree Queue 3
structure?
Choose the right evaluation order to
Left->root- Root->Left- Left->Right-
traverse a Binary Search Tree in None of these 3
>Right >Right >Root
postorder traversal technique.
Choose the balance factor of each
node in an AVL tree for which the tree -1,0 or 1 greater than 1 less than -1 None of these 1
is balanced.
level of left
height of left
In an AVL tree, the balance factor of a subtree-level
subtree-height Both 1 and 2 None of these 2
node is calculated by- of right
of right subtree
subtree