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
There are 11 courses offered in a program. Few courses require other courses to be completed as a prerequisite. The below table gives the prerequisite of all courses. All prerequisites of a course must be completed before opting for that course in any semester. There is no constraint on how many courses a student can take in a semester.

Select the order of courses that can be opted by a student if he/she wishes to complete all 11
courses in minimum number of semester. Parenthesis represents all courses opted in the same semester.
Select the order of courses that can be opted by a student if he/she wishes to complete all 11
courses in minimum number of semester. Parenthesis represents all courses opted in the same semester.
Solution
Solution
The pre-order traversal of a binary search tree with integer values produces the following sequence: 15, 10, 5, 7, 12, 14, 25, 18, 20. What is the value of the right child of the root of the tree?
Solution
Solution
Solution
Solution
Solution
Which of the following option represents the fail function (or prefix function) for pattern 'onion' in the Knuth-Morris-Pratt (KMP) algorithm?
Solution
Which of the following sorting algorithms will have the same time complexity irrespective of the sequence of elements in the input?
Solution
Solution
Solution
Consider the max-heap [40, 20, 30, 15, 18, 25, 14, 10, 12, 11, 13] built by repeatedly inserting values into an empty heap. Which of the following could not have been the last element inserted
into this heap?
into this heap?
Solution
Solution
Solution
Consider aundirected connected graph Gwith 27 edges. What is the minimum number of vertices in graphG?
Solution
Solution
In a binary tree T, if the number of nodes with two child nodes are 16, then the number of leaf nodes are ___
Solution
Solution
Solution
Solution
Solution
Solution
Consider the following network:

Consider the network given above with source s and sink t, with the numbers on the edges denoting maximum capacity across a particular edge. The value of the maximum flow in the given network is__.
Consider the network given above with source s and sink t, with the numbers on the edges denoting maximum capacity across a particular edge. The value of the maximum flow in the given network is__.
Solution
Let G be a simple graph. The size of the minimum vertex cover of G is 12 and the size of the maximum independent set of G is 16. What are the number of vertices in graph G?
Solution
Shape
Thickness [ / ]
3
All colors