Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT"DIPLOMA LEVEL : PROGRAMMING, DATA STRUCTURES AND ALGORITHMS USING PYTHON (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
Solution
Solution
Solution
What is recurrence and time complexity for theworst caseofQuick Sort? Consider that algorithm select last element as pivot element.
Solution
Solution
Consider the following graph

Which of the following vertex sequence is the correctBFS traversalon the graph started from node7? Assume that when a node has multiple neighbours, BFS would visit the numerically smaller valued node first.
Which of the following vertex sequence is the correctBFS traversalon the graph started from node7? Assume that when a node has multiple neighbours, BFS would visit the numerically smaller valued node first.
Solution
Which of the following statements istrueabout 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.
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.
Solution
Which of the following is/are alwaystrueabout theBellman-Fordalgorithm?
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.
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.
Solution
Solution
Solution
Solution
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?
Solution
Solution
Solution
Solution
Solution
Solution
Solution
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 ___.
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 ___.
Solution
Consider a binarymin-heapimplemented using list. Which of the following lists represents a binary min-heap?
Solution
Which of the following are possiblevalidcodes for the character set S = {A, B, C, D, E, F}, generated using the Huffman algorithm?
Solution
Solution
Consider the network given below with sourcesand sinkt, with the numbers on the edges denoting maximum capacity across a particular edge.

Which of the following edges form avalid min cutin the given network?
Which of the following edges form avalid min cutin the given network?
Solution
Comprehension Passage
Based on the above data, answer the given subquestions.
Solution
Comprehension Passage
Based on the above data, answer the given subquestions.
Solution
Shape
Thickness [ / ]
3
All colors