Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Corr

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 only stores It acquires the


You cannot have
Select the correct option on an array of It can store any element of similar data type with
an array of void 4
the void data type. data-type data type to first the highest
data type
element precision in it
Which ADT allows dynamic allocation and
Queue Array Stack Linked List 4
deallocation of memory?
To define
operations on
To optimize To represent To specify how
data without
What is the primary purpose of an ADT? data access and concrete data data is stored in 2
revealing
retrieval structures memory
implementation
details
An asymptotic An asymptotic An asymptotic
Which one is appropriate for the Big upper bound on lower bound on tight bound on
None of these 3
Theta notation? the growth rate the growth rate of the growth rate
of a function. a function. of a function.
A recursive function is said to be
_________ recursive if no operations are
tail non-tail direct indirect 1
pending to be performed when the
recursive function returns to its caller.
Consider an array A[20, 10], assume 4
560 565 570 575 1
words per memory cell and the base
address of array A is 100. What is the
address of A[11, 5] ? Assume row major
storage.
Choose the linear data structure from
Array AVL Trees Binary Trees Graphs 1
the following.
The algorithm The algorithm The algorithm The algorithm
What does "finiteness" mean in the must must run on a must produce a must have a
4
context of algorithm? eventually finite amount of finite amount of finite number of
stop. memory. output. steps.
In recursion, the condition for which the
There is No such
function will stop calling itself is Best Case Worst Case Base Case 3
cases
____________
Let f(n) and g(n) be two non-negative
function, then select which inequality f(n) >= c*g(n) f(n) <= c*g(n) f(n) = c*g(n) for
None of these 2
holds for f(n) = O(g(n)) where c and n0 are for all n>=n0 for all n>=n0 all n>=n0
two positive constants.
Indetify the minimum number of
comparisons required to determine if
Θ(n) Θ(logn) Θ(n*logn) Θ(1) 2
an integer appears more than n/2
times in a sorted array of n integers.
Consider an array consisting of
negative(-ve) and positive(+ve)
numbers. Estimate the worst case
time complexity of an algorithm to O(N) O(N Log N) O(N * N) O(N Log Log N) 3
segregate the numbers having same
sign altogether i.e all +ve on one side
and then all -ve on the other ?
Consider a 2-dimensional array A[3][4]
stored in memory. The array is laid
out in a contiguous block of memory.
9 10 11 12 3
If the array is organized in row-major
order, what is the index of the
element A[2][3]?
Fixed rule
Implementation Operating
Select the factor that determines The defined by the Compiler
choices made by system 2
size of an ADT. programming optimization
the programmer configuration
language
Memory waste
elements can if an array’s
Memory is Indexing is
Select which one of the following is be accessed elements are
stored started from 4
the limitation of the array. from smaller than
consecutively. Zero.
anywhere. the size allotted
to them
Select the time complexity of the
function f(N) = 10N^2 + 5N +6 when N O(1) O(N) O(N) O(N^2) 4
is very large.
Which of the following is the tightest
upper bound that represents the
O(log n) O(n) O(n log n) O(n^2) 4
number of swaps required to sort n
numbers using selection sort?
Efficient
Which of the following is a key Simplicity of Binding of data Speed of
memory 3
characteristic of an ADT? syntax and operations execution
management
What is the time complexity of the
following code snippet?
O(N) O(N log N) O(1) None of these 2
for(i=1;i<=N;i++){ if(i==10) break;
printf("%d",i)}
What is the time complexity of the
following code snippet? O(N log N) O(1) O(N) None of these 2
for(i=1;i<=N;i++){printf("%d",i)}
Which of the following are themselves All of the
String Structure Char 2
a collection of different data types? mentioned
Choose the option that cannot be a Another None of the
Function Array 2
member of a structure. structure mentioned
What is the time complexity of
accessing an element in an array by its O(1) O(log n) O(n) O(n^2) 1
index?
In a grid with
In a two-dimensional array, how are Sequentially in Sequentially in a
rows and Randomly 1
elements arranged in memory? a single row single column
columns
What is the primary advantage of Constant time
Faster random Dynamic Reduced
using a linked list over an array as an complexity for 3
access resizing memory usage
underlying structure for an ADT? insertion
Identify the another name of Linear Random Sequential
Perfect seach none of these 3
Search. search search
O(n^2) O(nlogn) O(2^n) O(logn) 4
Divide-and-
Choose the appropriate algorithm Heuristic Greedy
conquer Backtracking 1
design technique used in Merge sort. approach approach
Choose which of the following sorting
algorithms is closely related to Shell Bubble sort Insertion sort Merge sort Selection sort 2
sort.
Divide-and- Non-
Comparison
Select the correct algorithm for conquer comparison
based sorting none of these 2
Bubble sort. algorithm based sorting
algorithm
algorithm
Identify the minimum number of
passes required to sort an array of size n+1 2n n-1 n/2 3
n, using the bubble sort algorithm.
the array is
the array is divided into the array is
divided into three divided into
the array is not
two parts,where the two
divided ,but an
Choose the correct statement in case parts,where left part is parts,where the
extra array is 4
of Insertion sort. the left part is unsorted and left part is
required to
unsorted and the right part is sorted and the
store elements
the right part sorted and the right part is
is sorted mid portion unsorted
contains the
value which
needs to
compare
If you apply Radix sort on the array :
{329, 355, {355, 329, 457, {720, 329, 436, {720, 355, 436,
{329, 457, 839, 436, 720, 355, 657}
436, 457, 657, 436, 720, 657, 839, 355, 457, 457, 657, 329, 3
then what will be the output after the
720, 839} 839} 657} 839}
second pass?
Select the correct sorting algorithm
which gives the best performance in Insertion sort Quick sort Merge sort Selection sort 1
case of sorted or nearly sorted arrays.
Identify the best case time complexity
O(n) O(1) O(logn) O(nlogn) 2
for the Linear search algorithm.
Apply recursive approach instead of
more lines of less code and
an iterative approach for Binary less memory more memory
code to be easy 4
search because it gives the advantage consumption consumption
written implementation
of __________________.
Select which one of the following
sorting algorithm is fastest in average Merge sort Shell sort Quick sort Insertion sort 3
case?
Identify the appropriate sorting
algorithm for which we need an extra Shell sort Merge sort Insertion sort Selection sort 2
array.
Middle element
as pivot which
Choose the best way for selecting the First element Last element as
becomes none of these 3
pivot element in case of Quick sort. as pivot pivot
median of all
values in array
Identify the correct value of low and
low = 0 ; high low = mid-1 ; low = 0 ; high = low = 0 ; high =
high in case of Binary search when 1
= mid-1 high = 0 mid mid+1
array[mid] > search_value.
Choose the worst case running time
O(nlogn) O(n) O(logn) O(n^2) 4
for the Quick sort algorithm.
Chose the appropriate algorithm Dynamic Divide and
Backtracking Greedy Method 3
designing technique for quicksort. Programming conquer
Predict the algorithm which is not Polynomial
Insertion sort Binary Search Radix sort 2
suitable for linked lists. manipulation
Which type of linked list contains a
Singly linked Circular linked Doubly linked
pointer to the next as well as previous All of these 3
list list list
node in the sequence.
Predict the average case complexity of
O(nlogn) O(logn) O(n) O(n^2) 4
bubble sort.
Choose from the following which has
Merge sort Bubble sort Quick Sort Selection sort 1
the lowest worst case 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

Identify the numbers of edges in a


2n+1 n-1 2*n 2n-1 2
binary tree with n nodes

Determine the inorder traversal of the


following binary tree:
1
/\ 4-2-5-1-3 1-2-3-4-5 3-1-5-4-2 5-4-2-1-3 1
23
/\
45

In a binary tree,the number of internal


node of degree 1 is 5 and the number 11 10 12 15 1
of internal nodes of degree 2 is
10.Then Calculate the number of leaf
nodes in the binary tree
Select the external memory data
structure that is most commonly AVL tree Binary tree B tree Heap tree 3
utilized.
Identify the level of the root node in a
1 2 0 3 3
tree structure.
Calculate the number of nodes with a
degree of 2 in a binary tree T, given log(n) n-1 n n+1 2
that it has n leaf nodes.
Identify the possible sequence of
nodes examined in a binary search
90,40,65,50,88 90,110,88,85 190,60,90.85,88 65,140,80,70,88 3
tree (BST) when searching for a key
value of 88.
Identify the characteristic of elements
obtained from the inorder traversal of sorted order unsorted order random order none of these 1
a binary search tree (BST).
When data is
transferred
When a asynchronously
resource is (data not
Write which one of the following is an
shared among necessarily Load Balancing All of the above 4
application of Queue data structure?
multiple received at
consumers. same rate as
sent) between
two processes
In push
operation, if In push
new nodes are operation, if
inserted at the new nodes are
Write which of the following is true beginning of inserted at the
Both of the
about linked list implementation of linked list, end, then in pop All of the above 3
above
queue? then in pop operation,
operation, nodes must be
nodes must be removed from
removed from the beginning.
end.
Select the position where a new At the centre
At the head of At the tail of the As per user's
element be inserted if queue is position in the 2
link list link list choice
represented as link list link list
Write which of the following is NOT a
common operation in a queue data Enqueue Dequeue Peek Shuffle 4
structure?
Write the name of the data structure
in which elements can be inserted or
Queue Circular queue Dequeue Priority queue 3
deleted at/from both ends but not in
the middle is?
A linear list of elements in which
deletion can be done from one end
Queue Stack Tree Linked list 1
(front) and insertion can take place
only at the other end (rear). Select the
name of the data structure from the
option below
Select the another name of circular Rectangle
Ring Buffer Square Buffer Curve Buffer 1
queue Buffer
Select the data structure used to
Array List Heap Tree 3
implement Priority Queue efficiently
A circular queue is implemented using
an array of size 10. The array index
starts with 0, front is 6, and rear is 9.
0 7 9 10 1
Select the option where the insertion
of the next element takes place at the
array index.
Predict the value of the postfix
1 40 74 -18 4
expression 6 3 2 4 + – *
Write the name of the operation
Garbage
where a user tries to remove an Underflow Empty collection Overflow 1
Collection
element from an empty stack
Stack entries
There is a
A collection of may be The entries are
Entries in a stack are “ordered”. Select Sequential
stacks is compared with stored in a 4
the meaning of this statement entry that is
sortable the ‘<‘ linked list
one by one
operation
Choose the data structure to store the
return address of recursive function Stack Queue Link list DQueue 1
call
Select the data structure required for
Stack Array Queue Tree 3
Breadth First Traversal on a graph
What is the output sequence of
elements in which the elements are
inserted into the queue in the order ABCD DCBA DCAB ABDC 1
'A', 'B', 'C', and 'D' and then removed
from a queue one at a time and print?
What are the three basic notations Binary, Octal, Linked List, Compiler,
Infix, Postfix,
used to express an arithmetic and Stack, and Interpreter, and 2
and Prefix.
expression? Hexadecimal. Queue. Assembler.
Due to the LIFO
nature of
stacks, the Stacks can
Stacks simplify order of perform
Stacks require
complex operations is complex
less memory
What is an advantage of using a stack expressions by inherently mathematical
compared to 3
to evaluate postfix expressions? adding followed in calculations
other data
parentheses postfix faster than
structures.
automatically. expressions, other data
eliminating the structures.
need for extra
parentheses.
Infix to postfix There is no Use the Infix to postfix
Briefly describe how to convert an conversion direct way to shunting-yard conversion can
3
infix expression to postfix notation. requires a convert algorithm, be done by
complex between infix which assigns simply
algorithm and postfix priorities to reversing the
involving notation. operators and expression.
binary trees. operands to
determine the
order in the
postfix
expression.
Queues
inherently
follow the FIFO
Queues Queues require
Queues (First In First
ensure less memory
What is the advantage of using a guarantee faster Out) principle,
efficient compared to
queue over a stack when processing processing of which is 3
access to the stacks for
tasks in a specific order? high-priority suitable for
latest element storing
tasks. tasks arriving
added. elements.
and being
processed
sequentially.
Managing
browser Representing
Displaying the
history, where the connections
Storing data hierarchical
Describe a real-world application of a users can between
permanently in structure of an 1
stack. navigate back different
a database. organization
and forth computers in a
chart.
through network.
visited pages.
Simulating a
Representing Implementing a
Simulating a waiting line
the hierarchy social media
Give an example of a real-world playlist of songs (e.g., customers
of folders in a newsfeed that 4
application of a queue. to be played in a in a store or
computer shows posts
specific order. tasks waiting to
directory. chronologically.
be printed).
The front
In a circular queue, what happens An error occurs, The queue element is
The queue
when an element is dequeued from a and the becomes removed, and 4
remains full.
full queue? operation fails. empty. the queue is no
longer full.
O(log n) for
O(n) for
both O(1) for both The complexity
enqueue and
What is the time complexity of operations enqueue and depends on the
O(1) for
enqueue and dequeue operations in a due to dequeue, as current size of
dequeue, as 2
simple queue implemented using an logarithmic they involve the queue and
adding requires
array? search for constant-time varies
searching for an
available pointer updates. dynamically.
empty slot.
space.
How is the rear index updated when
rear = (rear + rear = (rear - 1)
enqueuing an element into a circular rear = rear + 1 rear = rear - 1 1
1) % size % size
queue?
Which operation is used to create a
new node in a linked representation CreateNode() NewNode() AllocateNode() malloc() 4
of a stack?
It does not
How does the space complexity of a
It scales It scales It scales scale with the
linked representation of a stack scale 1
linearly. logarithmically. quadratically. number of
with the number of elements?
elements.
How does the time complexity of Pop and Push It depends on
Popping is Popping is
popping an element from a linked both have the the
always faster always slower 3
stack compare to pushing an same time implementation
than pushing. than pushing.
element? complexity. of the stack.
The queue is The rear wraps Elements are
The front is
What happens when the rear of the full and no around to the shifted to the
moved to the
queue reaches the end of the array in more beginning of the left to make 2
end of the
the array representation? elements can array if there is space for new
array.
be added. space. elements.
In a linked representation of a queue, As the first As a separate As a separate
As the last node
how is the front of the queue node in the pointer to the pointer to the 3
in the linked list.
represented? linked list. front node. rear node.
Returns the top
Adds an Returns the top
How does the Peek operation affect Removes the element
element to the element and 3
the stack? top element without
top removes it
removing it
Nodes that Nodes that are
Choose from the following that best Nodes that have Nodes that are
share the same connected by a 1
describes siblings in a binary tree. the same value. leaf nodes.
parent. single edge.
Identify the sequence of nodes visited
Root, Left, Left, Root, Right, Left,
during a preorder traversal of a binary Left, Right, Root 1
Right Right Root
tree.
Select the time complexity for
searching an element in a balanced O(1) O(n) O(log n) O(n^2) 3
binary search tree.
Determine the preorder traversal of
the following binary tree:
1
/\ 1, 2, 4, 5, 3 4, 2, 5, 1, 3 1, 3, 2, 5, 4 1, 2, 3, 4, 5 1
23
/\
45
Advanced
Select the correct expansion for AVL in Adaptable Adelson-Velsky Absolute Value
Variable 2
AVL Tree. Vertex List and Landis Level
Language
Identify the minimum number of
children a node can have in a B tree of m m/2 m-1 m+1 2
order m.
Identify the term used to describe the
number of edges from the root to a Height Depth Length Width 2
specific node in a tree structure.
Select the binary tree type where
Full binary Perfect binary Complete Strictly binary
each node is allowed to have either 0 4
tree tree binary tree tree
or 2 children.
Identify the pairs of traversals that are
Preorder and Preorder and Inorder and
insufficient to reconstruct a binary None of these 2
Inorder Postorder Postorder
tree.
Choose the correct postorder
traversal of the given binary tree:
P
/\
QR PQRSTUV WRSQPVT SWTQXUV STWUXVQ
3
/\/\ WX UX RP RP
STUV
/\
WX

Select the statement that accurately


describes the time complexity of O(log n) O(n) O(n log n) O(1) 1
searching in an AVL Tree.
Every binary Every complete Every full A binary tree
Choose the correct statement about a tree is either binary tree is binary tree is cannot be both
3
binary tree. complete or also a full binary also a complete complete and
full tree binary tree full
Determine the maximimum possible
3 4 5 6 1
level of an AVL tree with 7 nodes.
The degree of a node in a tree is Number of Number of
Number of child
defined by _____. Select the correct node/s in left node/s in right 2(N) 2
node/s
option. sub tree sub tree
Calculate the number of possible
3 4 5 6 3
distinct binary trees with 3 nodes .
Predict a graph that has no cycles is
Tree Forest Bipartite Graph Eulerian Graph 1
called:
There is a
Every vertex is There is a path
Predict the term 'strongly connected' directed path
connected to from every The graph has
means in the context of directed from every 3
every other vertex to every no cycles.
graphs? vertex to every
vertex. other vertex.
other vertex.
Choose what is the time complexity of
the Depth-First Search (DFS) algorithm
on an adjacency matrix representation O(V) O(E) O(V + E) O(V * E) 3
of a graph with 'V' vertices and 'E'
edges.
Choose which graph traversal
Depth-First Dijkstra's Breadth-First
algorithm uses a queue data Postorder 4
Search (DFS) algorithm Search (BFS)
structure.
Choose in a directed graph, a vertex
Source Sink Node Root 1
with no incoming edges is called:
Determine the minimum number of
edges needed to create a connected n-1 n n+1 2n 1
graph with 'n' vertices.
Choose what is the primary purpose
Sorting Searching Merging Deleting 2
of hashing in data structures.
When two
The process of The process of
distinct keys A step in the
In hashing, predict what is a collision? creating a resizing the 2
hash to the hash function
hash code hash table
same index
In hashing, choose which is used to
Array Linked List Hash Table Queue 3
store key-value pairs:
Determine the common method to Breadth-First Depth-First
Linear Probing Binary Search 1
handle collisions in hashing. Search Search
The ratio of
The speed of
Determine the load factor in a hash The size of the filled slots to The number of
the hash 2
table. hash table the total collisions
function
number of slots
Predict a disadvantage of using open High memory Difficulty in Limited Clustering of
4
addressing for collision resolution. utilization implementation flexibility elements
To generate a
Determine the purpose of a hash
To store data To retrieve data unique code for To sort data 3
function in hashing.
a given key
Write a hash collision resolution
Quadratic Coalesced
technique that uses multiple hash Linear Probing Double Hashing 3
Probing Hashing
functions.
To represent
Determine the purpose of an To store the To store the
the edges To perform
adjacency matrix in graph vertices of a weights of 2
between graph traversal edges
representation. graph
vertices
A road map
Identify an example of a weighted A stack data
A family tree A social network with distances 3
graph from the following options. structure
between cities
In a hash table of size 157 using the
division method and hash function
19 15 4 16 2
h(k) = k % M, determine the position
of the key with the value 172.
Determine the hash function used in
the division method where k is the h(k) = k/M h(k) = k mod M h(k) = M/k h(k) = M mod k 2
Key and M is the size of the Hash table
Determine the average retrieval time
Θ(n) Θ(nlogn) Θ(logn) Θ(n^2) 1
when n keys hash to the same slot.
Choose the operations which can be Insert and
Insert only Search only Replace 3
performed on a hash table. search
Compute the minimum number of
edges required to form a connected n n-1 n+1 2n 2
graph with n vertices.
Determine the worst-case search time
complexity of a hashing algorithm O(N log N) O(N) O(N^2) O(N^3) 2
implemented using chaining.
Construct the formula to calculate the Information
number of edges present in a (n *(n + 1)) / 2 (n *(n - 1)) / 2 n given is 2
complete graph having n vertices. insufficient
For a given graph G having v vertices
and e edges, which is connected and
v=e v=e+1 v+1=e v=e-1 2
has no cycles, examine which of the
following statements holds true.
Identify the methods commonly used Adjacency List Adjacency List,
Incidence No way to
for representing a graph data and Adjacency Adjacency 3
Matrix represent
structure. Matrix Matrix and
Incidence
Matrix
Calculate the number of elements in
the adjacency matrix of a graph 7 14 36 49 4
having 7 vertices and 10 edges.
Identify the data structures typically
Stack for BFS, Queue for BFS, Stack for both Queue for both
used to implement BFS and DFS for 2
Queue for DFS Stack for DFS BFS and DFS BFS and DFS
traversing a graph.
Choose the correct name for a graph
Trivial graph Regular graph Bipartite graph None of these 1
which has no edges.
Interpret the time complexity
required to calculate the number of
edges in a graph when its information O(V) O(E^2) O(E) O(V^2) 4
is stored in the form of an adjacency
matrix.
The number of The total The number of
Choose the meaning of the word "in- The number of
edges going number of vertices
degree" in the context of a directed edges coming 2
out from that edges adjacent adjacent to that
graph into that vertex.
vertex. to that vertex. vertex.
Calculate the load factor α for a hash
table T with 25 slots that stores 2000 80 82 0.8 0.125 1
elements.
Determine the hash function for
integers that will distribute keys most h(i) = (12 ∗ i) h(i) = (11 ∗ i^2) h(i) =i^3 mod h(i) =i^2 mod
3
uniformly over 10 buckets numbered mod 10 mod 10 10 10
0 to 9, where i ranges from 0 to 2024.
Identify the open addressing
technique from the following options Quadratic
Linear Probing Double Hashing Rehashing 3
that is free from the clustering Probing
problem.
Worst case
Identify an advantage of chained hash complexity of
Space used is Deletion is None of the
tables (external hashing) over the search 3
less easier above
open addressing scheme. operations is
less
Choose the searching technique that
AVL Tree
has a time complexity of O(1) for Binary Search Linear Search Hashing 4
Search
searching the data.
Consider a graph G with n vertices and
m edges. Determine the tightest
upper bound on the running time of
O(m+n) O(n^2) O(mn) O(n) 2
Depth First Search (DFS) for G,
assuming the graph is represented
using an adjacency matrix.
Choose which collision resolution
technique involves placing collied Quadratic
Linear Probing Double Hashing Chaining 1
elements in next available empty solt Probing
in the hash table?
Choose which of the following
statement(s) is/are correct? p1 p2 p1 & p3 p2 & p4 3
P1: Every tree will always be a graph
P2: Every graph will always be trees.
P3: Every tree will be a graph, but
every graph will not be a tree
P4: Every graph will be a tree, but
every tree will not be a graph.
Determine the time complexity of
Depth First Search (DFS), given V as
O(V+E) O(V) O(E) O(V*E) 1
the number of vertices and E as the
number of edges in the graph.
Choose the correct Data structure
used in standard implementation of Stack Queqe Linked List Tree 2
Breadth First Search ?
Select the correct option: If an edge
starts and ends at the same vertex, loop multiple edge vertex none of these 1
then it is called_____.
Calculate how many edges are there
in a graph with 10 vertices and the 60 30 40 10 2
degree of each vertex is 6.
Determine the time complexity of
Breadth First Search (BFS), given V as
O(V+E) O(V) O(E) O(V*E) 1
the number of vertices and E as the
number of edges in the graph.
Choose the correct number which is
regarded as the degree of isolated 0 1 4 2 1
vertex.
Choose the collision resolution
Quadratic
technique that involves maintaining a Linear Probing Double Hashing Chaining 4
Probing
linked list of collided keys.

You might also like