Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Question Bank for GATE Computer Science Engineering  >  Test: Dynamic Programming, P & NP Concepts- 3 - Computer Science Engineering (CSE) MCQ

Test: Dynamic Programming, P & NP Concepts- 3 - Computer Science Engineering (CSE) MCQ


Test Description

10 Questions MCQ Test Question Bank for GATE Computer Science Engineering - Test: Dynamic Programming, P & NP Concepts- 3

Test: Dynamic Programming, P & NP Concepts- 3 for Computer Science Engineering (CSE) 2024 is part of Question Bank for GATE Computer Science Engineering preparation. The Test: Dynamic Programming, P & NP Concepts- 3 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Dynamic Programming, P & NP Concepts- 3 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Dynamic Programming, P & NP Concepts- 3 below.
Solutions of Test: Dynamic Programming, P & NP Concepts- 3 questions in English are available as part of our Question Bank for GATE Computer Science Engineering for Computer Science Engineering (CSE) & Test: Dynamic Programming, P & NP Concepts- 3 solutions in Hindi for Question Bank for GATE Computer Science Engineering course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Dynamic Programming, P & NP Concepts- 3 | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study Question Bank for GATE Computer Science Engineering for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Dynamic Programming, P & NP Concepts- 3 - Question 1

The number of spanning trees for a complete graph with seven vertices is

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 1

Number of spanning tree possible with n-node = nn - 2.
Given, n = 7
Total number of spanning trees = 75

Test: Dynamic Programming, P & NP Concepts- 3 - Question 2

If one uses straight two-way merge sort algorithm to sort the following elements in ascending order:
20, 47, 15, 8, 9, 4, 40, 30, 12, 17
Then the order of these elements after second pass of the algorithm is

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 2

Given array:

So, the order of elements after second pass of the algorithm is 8,15,20,47, 4,9,30,40,12,17,

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Dynamic Programming, P & NP Concepts- 3 - Question 3

Consider the following sorting algorithms:
1. Quicksort
2. Heapsort
3. Mergesort
Which of them perform in least time in the worst case?

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 3

Worst case time complexity of Quick sort = O(n2) when input is already sorted.
Worst case time complexity of Heap sort = O(n log n).
Worst case time complexity of Merge sort = O(n log n).

Test: Dynamic Programming, P & NP Concepts- 3 - Question 4

The number of articulation points of the following graph is:

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 4

An articulation point (or cut vertex) is that vertex removing which (along with its edges) disconnects the graph.

Therefore number of articulation points is 3.

Test: Dynamic Programming, P & NP Concepts- 3 - Question 5

Consider the following tree:

If the post order traversal gives ab - cd * + then the label of the nodes 1, 2, 3, ... will be

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 5

Post order traversal = ab - cd*+. As we know that post order traversal goes in the order of
LEFT CHILD → RIGHT CHILD → PARENT (ROOT)

Hence, Label of 4, 5, 2 will be a, b, - respectively
Labe! of 6, 7, 3 will be c, d, * respectively
Label of 1 will be +

Test: Dynamic Programming, P & NP Concepts- 3 - Question 6

The expression tree given in figure evaluates to 1, if

1. a = - b and e = 0
2. a = - b and e = 1
3. a = b and e = 0
4. a = b and e = 1

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 6

The corresponding expression is - (- a - b) + e!.
This is 1 if a = - b and e is either 1 or 0, since 1! = 0! = 1.

Test: Dynamic Programming, P & NP Concepts- 3 - Question 7

Match List-I with List-ll and select the correct answer using the codes given beiow the lists:

Codes:

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 7

All pairs shortest path is find using Floyd Warshall algorithm, which is an example of dynamic programming.
• Quick sort and merge sort are example of “divide and conquer” algorithms.
• MST or minimum weight spanning tree is a tree with a subset of edges such that it connects all vertices and summation of edge weight is minimum Prim’s algo and Kruskal’s algorithm are used for this, which are examples of greedy approach.
• By using Depth First Search (DFS) one can easily find set of connected components.

Test: Dynamic Programming, P & NP Concepts- 3 - Question 8

Consider the following tree:

If this tree is used for sorting, then a new number 8 should be place as the

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 8

Since the tree is used for sorting hence taking INORDER TRAVERSAL (Left-Root-Right) we have 8 placed at the left child of the node labeled 10.

Test: Dynamic Programming, P & NP Concepts- 3 - Question 9

The order of a B-tree is defined as the

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 9

The default order of B-tree is maximum number of pointer in any node.

Test: Dynamic Programming, P & NP Concepts- 3 - Question 10

The depth of a complete binary tree with ‘n’ nodes is (log is to the base two)

Detailed Solution for Test: Dynamic Programming, P & NP Concepts- 3 - Question 10

If the depth is d, the number of nodes n will be 2(d+ 1) - 1.
So, n + 1 = 2(d+1)
or, d = log (n + 1 ) - 1

63 videos|7 docs|165 tests
Information about Test: Dynamic Programming, P & NP Concepts- 3 Page
In this test you can find the Exam questions for Test: Dynamic Programming, P & NP Concepts- 3 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Dynamic Programming, P & NP Concepts- 3, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)