MauryaHub PYQ Practice

Programming, Data Structures and Algorithms using Python · End Term · May 2024 · AN

Programming, Data Structures and Algorithms using Python · End Term · May 2024 AN

← Course papers · Start practice / exam

This page contains the reliably extracted subset, not the complete original paper.

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 26 published solutions

Question 227 NAT · 3.0 marks

Consider a **Block nested loop join** for the two relations, **instructor** and **department**. Assuming the worst-case memory availability and **instructor** as the outer relation, the provided details are as follows: • Total number of block transfers: 30500 • Total number of seeks required: 2000 • Number of block in the outer relation: 500 What is the number of blocks in the inner relations?

A published solution is not available for this question yet.

Report a correction for Q227

Question 229 MCQ · 4.0 marks

Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q229

Question 230 MCQ · 4.0 marks

Source diagram or notation
A.
10
B.
11
C.
12
D.
13

A published solution is not available for this question yet.

Report a correction for Q230

Question 231 MCQ · 4.0 marks

Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q231

Question 232 MCQ · 4.0 marks

What is recurrence and time complexity for the **worst case** of **Quick Sort** ? Consider that algorithm select last element as pivot element.
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q232

Question 233 MCQ · 4.0 marks

Source diagram or notation
A.
I
B.
F
C.
E
D.
H
E.
G

A published solution is not available for this question yet.

Report a correction for Q233

Question 234 MCQ · 4.0 marks

Consider the following graph
Source diagram or notation
Which of the following vertex sequence is the correct **BFS traversal** on the graph started from node **7**? Assume that when a node has multiple neighbours, BFS would visit the numerically smaller valued node first.
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q234

Question 235 MCQ · 4.0 marks

Which of the following statements is **true** about Dijkstra's algorithm to find the shortest path? I. The shortest path returned by Dijkstra's algorithm always passes through the least number of vertices. II. To decide which node to visit next, Dijkstra's algorithm selects the node with maximum known distance.
A.
Only I is correct
B.
Only II is Correct
C.
Both I and II are correct
D.
Both I and II are incorrect

A published solution is not available for this question yet.

Report a correction for Q235

Question 236 MCQ · 4.0 marks

Which of the following is/are always **true** about the **Bellman-Ford** algorithm? I. It can not detect negative weight cycles in graph. II. It works correctly if the graph has negative edge weights but does not have negative weight cycles. III. It finds the shortest paths from a single source vertex to all other vertices in the graph.
A.
Only statement I and II are correct
B.
Only statement I and III are correct
C.
Only statement II and III are correct
D.
All statements are correct
E.
All statements are incorrect

A published solution is not available for this question yet.

Report a correction for Q236

Question 237 MCQ · 4.0 marks

Source diagram or notation
A.
12
B.
11
C.
8
D.
14 is a leaf node.

A published solution is not available for this question yet.

Report a correction for Q237

Question 238 MCQ · 4.0 marks

Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q238

Question 239 MCQ · 4.0 marks

Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q239

Question 240 MCQ · 4.0 marks

Let Z be an NP-complete problem and X and Y be two other problems not known to be in NP. X is polynomial time reducible to Z and Z is polynomial-time reducible to Y. Which one of the following statements is true?
A.
Y is NP-complete
B.
Y is NP-hard
C.
X is NP-complete
D.
X is NP-hard

A published solution is not available for this question yet.

Report a correction for Q240

Question 241 NAT · 4.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q241

Question 242 NAT · 4.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q242

Question 243 NAT · 4.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q243

Question 244 NAT · 4.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q244

Question 245 NAT · 4.0 marks

Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q245

Question 246 MSQ · 4.0 marks

Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q246

Question 247 MSQ · 4.0 marks

A baker is preparing an elaborate cake M. The recipe includes preparing several other components, each of which has its dependencies. The order in which these components must be prepared is given below: 1. Component X is used to make components P and Q. 2. Component Y is added to prepare components R and S. 3. Component T is prepared by mixing components Q and R. 4. Component Y is made by blending X. 5. Component U is made by mixing P and T. 6. Component V is made by adding sugar to component S. 7. The cake M is assembled by layering components U and V together. The baker has enough assistants to prepare multiple components simultaneously, allowing the cake M to be completed in the minimum number of steps, considering all dependencies. Each step represents a time unit during which one or more components can be prepared in parallel. The component(s) prepared in the 3rd step is/are ___.
A.
Q
B.
T
C.
R
D.
U
E.
S

A published solution is not available for this question yet.

Report a correction for Q247

Question 248 MSQ · 4.0 marks

Consider a binary **min-heap** implemented using list. Which of the following lists represents a binary min-heap?
A.
[6, 8, 15, 20, 12, 17, 21]
B.
[6, 8, 17, 20, 12, 15, 21]
C.
[6, 8, 15, 20, 17, 12, 21]
D.
[6, 8, 17, 12, 15, 20, 21]

A published solution is not available for this question yet.

Report a correction for Q248

Question 249 MSQ · 4.0 marks

Which of the following are possible **valid** codes for the character set S = {A, B, C, D, E, F}, generated using the Huffman algorithm?
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q249

Question 250 MSQ · 4.0 marks

Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation
E.Source diagram or notation
F.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q250

Question 251 MSQ · 4.0 marks

Consider the network given below with source s and sink t, with the numbers on the edges denoting maximum capacity across a particular edge.
Source diagram or notation
Which of the following edges form a **valid min cut** in the given network?
A.
Edges {ce, cd}
B.
Edges {ac, ce, de}
C.
Edges {fg, fi, hi}
D.
Edges {fg, fh}
E.
Edges {ij, ik}

A published solution is not available for this question yet.

Report a correction for Q251

Question 252 MCQ · 4.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q252

Question 253 MCQ · 4.0 marks

Source diagram or notation
Based on the above data, answer the given subquestions.
Source diagram or notation
A.Source diagram or notation
B.Source diagram or notation
C.Source diagram or notation
D.Source diagram or notation
      **AppDev1** **Section Id :** 64065364122 **Section Number :** 9 **Section type :** Online **Mandatory or Optional :** Mandatory **Number of Questions :** 32 **Number of Questions to be attempted :** 32 **Section Marks :** 100 **Display Number Panel :** Yes **Section Negative Marks :** 0 **Group All Questions :** No **Enable Mark as Answered Mark for Review and** No **Clear Response :** **Maximum Instruction Time :** 0

A published solution is not available for this question yet.

Report a correction for Q253