Which of the following data types is best suited for representing categorical data in a data warehouse?
Integer
Boolean
String
Float
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What is the main goal of data normalization in data transformation?
To reduce the dimensionality of data
To scale numeric attributes into a specific range
To reduce redundancy and inconsistency in data
To convert continuous data into discrete data
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What is the purpose of discretization in the context of data transformation?
To convert categorical data into numerical form
To reduce the number of records in a dataset
To group continuous attributes into intervals
To normalize data to a standard scale
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
A fact table has 3 dimensions: Time (365 days), Product (50 types), and Store (100 locations). If each cell in the cube contains sales data (fact), how many cells are in the data cube?
1,825
18,250
1,825,000
18,250,000
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
You want to perform compression on a data table that originally contains 40 million rows. After compression, the size is reduced by 60%. What is the new number of rows after compression?
16 million
24 million
28 million
40 million
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
ou are asked to discretize a dataset into 4 equal-frequency bins. The data contains the following values: [2, 5, 6, 10, 12, 14, 20, 22, 25, 30]. What will be the range of the second bin?
[2, 5, 6]
[10, 12]
[14, 20]
[22, 25, 30]
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Suppose the numbers 17, 15, 11, 18, 13, 16, 10, 19, 14, 12 are inserted in that order into an initially empty binary search tree. The binary search tree uses the reversal ordering on natural numbers i.e. 19 is assumed to be smallest and 10 is assumed to be largest. The inorder traversal of the resultant binary search tree is
19, 18, 16, 14, 12, 13, 10, 11, 15, 17
10, 11, 12, 13, 14, 15, 16, 17, 18, 19
10, 12, 14, 13, 11, 16, 15, 19, 18, 17
19, 18, 17, 16, 15, 14, 13, 12, 11, 10
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66

The inorder traversal of a BST is 11, 12, 13, 16, 24, 26 and the preorder traversal of the same tree is: 16, 12, 11, 13, 26, 24.

If the root node is deleted then what will be the next root of the resultant tree?

(i) 13 (ii) 24 (iii) 11 (iv) 26

(i) or (ii)

(i) or (iv)

(ii) or (iii)

(ii) or (iv)

Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider a full ternary tree having 4 internal nodes. What will be the total number of leaves to this tree? ____

Note: Full ternary tree is a tree whose all nodes have 0 or 3 children

9
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Given a simple undirected graph with n vertices such that every possible pair of vertices is connected with an edge. How many DFS traversals are possible for such a graph?
N^2
N!
N(N-1)
N(N-1)/2
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Hashing is an improvement over ___X___ data structure,

The X data structure is:

Direct Access Table
Array
Linked list
Balanced Binary Search Tree
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
To search an element from a data structure it takes some time complexity in the worst case scenario as stated below. Choose the correct option among following: [MSQ]
Binary tree takes O(n) time
Binary Search Tree takes O(n) time
Balanced Binary search tree takes O(logn) time
Priority queue(min heap) takes O(n) time
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33

Consider the above graph. Which among the following is correct BFS traversal ? [MSQ]

a b c g e d f
a g c b f e d
a c b g e f d
a b c d e f g
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Choose the correct option/s among the following statements: [MSQ]

Topological Sorting for a graph is possible if the graph is not a DAG.
There can be more than one topological sorting for a graph.
The first vertex in topological sorting is always a vertex with in-degree as 0
The first vertex in topological sorting is always a vertex with no incoming edges.

Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the relation R(a1, a2, a3, ……, an) with ‘n’ number of attributes. How many number of candidate keys are possible for R?
(2^n)-1
2^(n-1)
2^n
(2^n)+1
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following ER diagram.

If we convert the above diagram into the relational model, then which of the following is/are valid the attributes set for the relations? [MSQ]

Roll_no, Mob_no
Roll_no, Email_id
Mob_no, Email_id, Roll_no
Roll_no, Age, Mob_no, Email_id
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
What normal form is the following relation in when only H, I can act as the key?

R(H,I,J,K,L,M,N,O)

H,I->J,K,L

J->M

K->N

L->O

1NF
2NF
3NF
BCNF
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the set F of functional dependencies for relation schema R = (A, B, C, D, E).

A → BC

CD → E

B → D

E → A.

Which of the following is a canonical cover for R?

A → BC, CD → E, B → D, E → A
A → B, CD → E, B → D, E → A
A → C, D → E, B → D, E → A
A → BC, CD → E, E → A
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Qualcomm snapdragon 720G processor can sort 200 entries which are initially in descending order in 200 sec using quick sort. The number of entries the same processor can sort in 250 sec using selection sort is__? [ Note: Consider two decimal values ]
223.60
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
You have to sort 20 GB of data with only 2 GB of available main memory. Which sort should you use?
Heap Sort
Merge sort
Insertion sort
Quick Sort

Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a graph G = (V, E). how many numbers of edges have to be removed to construct a spanning tree of graph.
E
1
E-V+1
E-V
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What will be the output after the third pass of bubble sort to sort the following number sequence in ascending order.

2, 6, 8, 1, 4, 3

2, 6, 1, 4, 3, 8
2, 1, 4, 6, 3, 8
1, 2, 4, 3, 6, 8
1, 2, 3, 4, 6, 8
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following graph representing a road map? [ MSQ ]

What are the common edges between minimum cost and maximum cost spanning tree?

(S6, S9)
(S8, S9)
(S7, S10)
(S2, S3)
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Let A, B, C, D be four matrices of dimensions 10x5, 5x6, 6x7, 7x9 respectively. Find the difference between the maximum and minimum number of scalar multiplications required to find the product A B C D using the Matrix Chain Multiplication method is_____?
375
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Which of the following statements is/are TRUE? [ MSQ]
Consider a heap ‘H’. Each key in a heap is randomly increased or decreased by 1. Then we can restore the heap property on H in linear time O(n). The random choices are independent.
The problem of finding the shortest path from ‘s’ to ‘t’ in a directed, weighted graph exhibits optimal substructure.
A major disadvantage of merge sort is that it cannot easily be converted into a stable sort.
Heapsort can be used as the auxiliary sorting routine in radix sort, because it operates in place.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Consider the following Python function:

def calculate_depth(t, n):

if n not in t:

return 1

depth = 1

for c in t[n]:

depth += calculate_depth(t, c)

return depth

tree = {}

tree['X'] = ['Y', 'Z']

tree['Y'] = ['P', 'Q']

tree['Z'] = ['R']

tree['P'] = []

tree['Q'] = []

tree['R'] = []

print(calculate_depth(tree, 'X'))

What is the output of the given code ______?

6
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Consider the following Python function:

def r_s(d):

total = 0

for key, value in d.items():

if isinstance(value, dict):

total += r_s(value)

elif isinstance(value, int):

total += value

return total

data = {

'w': 3,

'x': {'y': 7, 'z': {'p': 2}},

'm': {'n': 1},

'o': 4

}

print(r_s(data))

What is the output of the `r_s(data)` function ______

17
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Consider the following Python function:

def computeD(X):

D = [0] * len(X)

for i in range(1, len(X)):

if X[i] < X[i - 1]:

D[i] = X[i - 1] - X[i]

else:

D[i] = 0

return D

X = [12, 10, 15, 9, 16]

result = computeD(X)

print(result)

Which ONE of the following values is returned by the function `computeD(X)` for `X = [12, 10, 15, 9, 16]`?

[0, 2, 0, 6, 0]
[0, 0, 5, 0, 7]
[0, 2, 0, 6, 0]
[0, 0, 0, 0, 0]
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following Python function:

def fun(arr):

x = [0] * len(arr)

x[0] = arr[0]

for i in range(1, len(arr)):

x[i] = x[i-1] + arr[i]

return x

What does the function fun(arr) return if arr = [2, 4, 6, 8]?

[2, 4, 6, 8]
[2, 6, 12, 20]
[2, 4, 10, 18]
[2, 8, 14, 20]
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
What is the result of the following function when n = 8 and r = 3?

def fun(n, r):

return (1 - r**n) / (1 - r)

result = fun(8, 3)

3280
3281
2186
2187
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What is the output of the following Python function when s = "xyz"?

def fun(s):

x = []

for start in range(len(s)):

for end in range(start + 1, len(s) + 1):

x.append(s[start:end])

return max(x, key=len)

result = fun("xyz")

"xyz"
"xy"
"x"
"yz"
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What will be the output of this Python code?

def fun(s):

parts = s.split('-')

return sum(int(part) for part in parts)

result = fun("5-15-25")

50
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
What is the output of the following Python code?

def fun(s, n):

return s * n

result = fun("X", 4) + "Y" + fun("X", 2)

XXXXYY
XXXXYYX
XXXXYXX
XXXXYX
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33