Learn with Anil · TGPSC HMWSSB Manager (Engineering) PYQsPractise online →Subscribe ₹149

TGPSC HMWSSB Manager Algorithms previous year questions with answers

Every Algorithms question asked in the TGPSC HMWSSB Manager (Engineering) papers on this site, grouped by topic. Answers come from TSPSC's final key; each has a short explanation (free here for a sample, all of them in the practice app).

Practise Algorithms online

Complexity & Recurrences

  1. Manager 2015 Paper 2 (CS & IT) · Q42 · Algorithms · Complexity & Recurrences

    Consider the following functions f(n) = 3n^√n g(n) = 2^(√n log₂n) h(n) = n!

    1. h(n)=O(f(n))
    2. h(n) is O(g(n))
    3. g(n) is not O(f(n))
    4. f(n) is O(g(n))
    Show answer

    Answer: (4) f(n) is O(g(n))

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  2. Manager 2015 Paper 2 (CS & IT) · Q43 · Algorithms · Complexity & Recurrences

    Which one of the following recurrence relation denotes the running time of selection sort algorithm.

    1. T(n) = 2T(n/2) + cn
    2. T(n) = T(n−1) + cn
    3. T(n) = T(n−1) + c
    4. T(n) = 2T(n/2) + c
    Show answer

    Answer: (2) T(n) = T(n−1) + cn

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  3. Manager 2015 Paper 2 (CS & IT) · Q45 · Algorithms · Complexity & Recurrences

    Which one of the following statements is correct? i) The Euler tour of a graph can be determined in polynomial time ii) The Hamiltonian cycle can be determined in polynomial time. iii) Determining whether a directed graph has a Euler tour is NP-complete iv) Determining whether a directed graph has a Hamiltonian cycle is NP-complete

    1. (i) and (ii)
    2. (i) and (iv)
    3. (ii) and (iii)
    4. (iii) and (iv)
    Show answer

    Answer: (2) (i) and (iv)

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  4. Manager 2015 Paper 2 (CS & IT) · Q46 · Algorithms · Complexity & Recurrences

    Which of the following statements is incorrect?

    1. If the output of one polynomial-time algorithm is fed into the input of another, the composite algorithm is polynomial
    2. Halting problem is NP-hard problem
    3. Travelling salesperson problem has a polynomial time algorithm
    4. Satisfiability problem is np-complete
    Show answer

    Answer: (3) Travelling salesperson problem has a polynomial time algorithm

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  5. Manager 2015 Paper 2 (CS & IT) · Q119 · Algorithms · Complexity & Recurrences

    A machine needs a minimum of 100 sec to sort 1000 names by quick sort. The minimum time needed to sort 100 names will be approximately

    1. 50.2
    2. 6.7
    3. 72.7
    4. 11.2
    Show answer

    Answer: (2) 6.7

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

Sorting & Searching

  1. Manager 2015 Paper 2 (CS & IT) · Q103 · Algorithms · Sorting & Searching

    Which data structure is used to implement radix sort

    1. Stacks
    2. Queue
    3. Linked list
    4. Tree
    Show answer

    Answer: (2) Queue

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  2. Manager 2015 Paper 2 (CS & IT) · Q104 · Algorithms · Sorting & Searching

    Which of the following sorting algorithm does not have worst case time complexity of O(n²)

    1. Bubble Sort
    2. Quick Sort
    3. Insertion Sort
    4. Heap Sort
    Show answer

    Answer: (4) Heap Sort

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  3. Manager 2015 Paper 2 (CS & IT) · Q114 · Algorithms · Sorting & Searching

    The average time required to perform a successful sequential search for an element in an array A(1:n) is given by

    1. (n+1)/2
    2. log₂n
    3. n(n+1)/2
    4. n²
    Show answer

    Answer: (1) (n+1)/2

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  4. Manager 2015 Paper 2 (CS & IT) · Q116 · Algorithms · Sorting & Searching

    Average successful search time taken by binary search on a sorted array of 10 items is

    1. 2.6
    2. 2.7
    3. 2.8
    4. 2.9
    Show answer

    Answer: (4) 2.9

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  5. Manager 2015 Paper 2 (CS & IT) · Q117 · Algorithms · Sorting & Searching

    What is the number of comparisons required for merging two sorted lists of sizes m and n into a sorted list of size m + n.

    1. O(m)
    2. O(n)
    3. O(m+n)
    4. O(log n + log m)
    Show answer

    Answer: (3) O(m+n)

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

Algorithm Design Techniques

  1. Manager 2015 Paper 2 (CS & IT) · Q44 · Algorithms · Algorithm Design Techniques

    Match the following:

    a. Divide and Conqueri. Graph Coloring
    b. Dynamic Programmingii. Travelling Salesperson Problem
    c. Backtrackingiii. Quicksort
    1. a:iii; b:i; c:ii
    2. a:iii; b:ii; c:i
    3. a:ii; b:iii; c:i
    4. a:ii; b:i; c:iii
    Show answer

    Answer: (2) a:iii; b:ii; c:i

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  2. Manager 2015 Paper 2 (CS & IT) · Q47 · Algorithms · Algorithm Design Techniques

    Which one of the algorithms obtains global optimal solutions?

    1. Greedy algorithm
    2. Dynamic Programming
    3. Greedy algorithm and Dynamic Programming
    4. Divide and Conquer
    Show answer

    Answer: (2) Dynamic Programming

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

Graph Algorithms

  1. Manager 2015 Paper 2 (CS & IT) · Q49 · Algorithms · Graph Algorithms

    What is the time complexity of depth first search traversal of a graph consisting of n vertices and m edges represented using adjacency list?

    1. O(n)
    2. O(m + n)
    3. O(n²)
    4. O(mm)
    Show answer

    Answer: (2) O(m + n)

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  2. Manager 2015 Paper 2 (CS & IT) · Q50 · Algorithms · Graph Algorithms

    What is the time complexity of Kruskal's algorithm for finding the minimum spanning tree of an undirected graph containing n vertices and m edges?

    1. O(n)
    2. O(m + n)
    3. O(n²)
    4. O(m log n)
    Show answer

    Answer: (4) O(m log n)

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.

  3. Manager 2015 Paper 2 (CS & IT) · Q78 · Algorithms · Graph Algorithms

    Which of the following minimal spanning tree algorithm assures connectivity of tree at all steps?

    1. Kruskal
    2. Prims
    3. Both Kruskal and Prims
    4. Dijkstra
    Show answer

    Answer: (2) Prims

    Explanation: open it in the practice app. It needs the ₹149 All-in-One Pass: one payment for every exam on the site.