LawMint Sign in

UGC NET Computer Science and Applications Data Structures and Algorithms Previous Year Questions

Try the preview and open any solution for a worked explanation.

UGC NET Computer Science and Applications practice pack

The practice pack for UGC NET Computer Science and Applications is coming soon to LawMint.

Question 1

Match List - I with List - II.

LIST-ILIST-II
A. Merge sortI. n²
B. Binary searchII. n log n
C. Quick sortIII. n
D. Search in an unsorted arrayIV. log n
Select one answer

Question 2

What is the maximum number of nodes that can be inserted in the following AVL tree without changing its height?

Binary tree: root60, left50, right70;70 has right80
Select one answer

Question 3

If f(n)=θ(g(n)) and g(n)=O(h(n)), then which of the following is true?

Select one answer

Question 4

Given the functions: Predecessor function: Pred(x)=x−1 and T(x, y+1)=pred(T(x, y)), T(x, 0)=x. Which of the following operations is a candidate for T?

Select one answer

Question 5

A binary search tree is obtained by inserting the words Mathematics, Physics, Geography, Zoology, Metrology, Geology, Psychology and Chemistry in order. Words are compared by dictionary order. Arrange the following words in increasing order of their level in the tree.

  • A. Mathematics
  • B. Zoology
  • C. Psychology
  • D. Physics
Select one answer

Question 6

In open addressing, how are collisions typically resolved?

Select one answer

Question 7

What is the height of the binary search tree obtained by inserting the numbers 40, 60, 50, 37, 52, 15, 8, 22 in the given order

Select one answer

Question 8

Match the LIST-I with LIST-II

LIST-I
Data structure
LIST-II
Characteristics
A. StackI. First-In-First-Out(FIFO) order
B. QueueII. Last-In-First-Out(LIFO) order
C. Linked listIII. Nodes with two children ordered
D. Binary search treeIV. Dynamic size, nodes linked sequentially
Select one answer

Question 9

How will the following min-heap appear on inserting the key 32?

Embedded diagram; all labels are within the figure
Select one answer

Question 10

Arrange the following prefix expressions in ascending order on the basis of their values. A. - * 2 / 8 4 3 B. ↑ - * 3 6 * 4 2 5 C. + - ↑ 3 2 ↑ 2 3 / 6 - 4 2 D. * + 3 + 3 ↑ 3 + 1 1 3 Choose the correct answer from the options given below:

Select one answer

Continue practising

The practice pack for UGC NET Computer Science and Applications is coming soon to LawMint.

UGC NET Computer Science and Applications practice pack

The practice pack for UGC NET Computer Science and Applications is coming soon to LawMint.