All mock tests are FREE till 31 December — register to save your progress
Paper 2 CS · UNIT 07

Data Structures and Algorithms – Previous Year Questions

215 questions from past UGC NET Paper 2 – Computer Science papers, each with the correct answer. Open any question for its explanation.

  1. The maximum number of comparisons needed to sort 9 items using radix sort is (assume each item is 5 digit octal number) :
    Answer: C. 360 Paper 2 CS · July 2018
  2. A 5-ary tree is tree in which every internal node has exactly 5 children. The number of left nodes in such a tree with 8 internal nodes will be :
    Answer: B. 33 Paper 2 CS · July 2018
  3. Consider a Boolean function of ‘n’ variables. The order of an algorithm that determines whether the Boolean function produces a output 1 is :
    Answer: D. Exponential Paper 2 CS · July 2018
  4. Consider a hash table of size seven, with starting index zero, and a hash function (7x+3) mod 4. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8,…
    Answer: A. 3, 10, 1, 8, __ , __ , __ Paper 2 CS · July 2018
  5. E is the number of edges in the graph and f is maximum flow in the graph. When the capacities are integers, the runtime of Ford-Fulberson algorithm is bounded by :
    Answer: A. O(E · f) Paper 2 CS · July 2018