adplus-dvertising

Welcome to the Data Structures and Algorithms MCQs Page

Dive deep into the fascinating world of Data Structures and Algorithms with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Data Structures and Algorithms, a crucial aspect of GATE CSE Exam. In this section, you will encounter a diverse range of MCQs that cover various aspects of Data Structures and Algorithms, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within GATE CSE Exam.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Data Structures and Algorithms. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of GATE CSE Exam.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Data Structures and Algorithms. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Data Structures and Algorithms MCQs | Page 12 of 30

Q111.
The time complexity of the following C function is (assume n > 0)

int recursive (int n) {
if (n == 1)
return (1);
else
return (recursive (n - 1) + recursive (n - 1));
}
Discuss
Answer: (d).O(2^n)
Q112.
A program takes as input a balanced binary search tree with n leaf nodes and computes the value of a function g(x) for each node x. If the cost of computing g(x) is min{no. of leaf-nodes in left-subtree of x, no. of leaf-nodes in right-subtree of x} then the worst-case time complexity of the program is
Discuss
Answer: (b).Θ(nLogn)
Q113.
Choose the best matching between the programming styles in Group 1 and their characteristics in Group 2.

 Group-1 Group-2
 P.  Functional 1. Command-based, procedural
 Q.  Logic   2. Imperative, abstract data type
 R.  Object-oriented  3. Side-effect free, declarative, expression evaluation
 S.  Imperative   4. Declarative, clausal representation, theorem proving
Discuss
Answer: (d).P-3, Q-4, R-2, S-1
Q114.
In a B+ tree index file if there are K search keys and each leaf node contains n records then the number of records to be accessed in the worst case is

a.

A

b.

B

c.

C

d.

D

Discuss
Answer: (d).D
Q115.
How many B-tree of order 3 can be constructed using 3 district keys?

a.

1

b.

2

c.

3

d.

4

Discuss
Answer: (a).1
Q116.
Which of the following is a minimum number of leaf nodes in a B-Tree of order 4 with height 3?

a.

2

b.

4

c.

6

d.

8

Discuss
Answer: (d).8
Q117.
If we are accessing a block in 100 block index using binary search, how many block read is Required to access the data in 100th block?
Discuss
Answer: (a).7
Q118.
Find the minimum number of elements that need to be placed in a B-tree of order 3 to reach 4 Levels?
Discuss
Answer: (c).15
Q119.
Construct a B+ tree for (1, 4, 7, 10, 17, 21, 31, 25, 19, 20, 28, 42) with n = 4. What is the key value at the root node?
Discuss
Answer: (b).17
Q120.
Calculate the order of B – tree using the following:

Block size = 512 bytes
Record pointer = 7 bytes
Block pointer = 6 bytes
Key filed = 9 bytes
Discuss
Answer: (c).24

Suggested Topics

Are you eager to expand your knowledge beyond Data Structures and Algorithms? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!