Skip to content

GATE CS Algorithms questions

Practise Algorithms questions for GATE CS. Explore official PYQs and original subject-wise quizzes, check answers and view available solutions. Free, no sign-in.

Compare greedy choices, dynamic-programming states and graph algorithms. Identify the input size before analysing the time and space complexity of each solution.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

1 on this page
Official PYQ1987AlgorithmsSearching, Sorting, HashingMCQ · 1 mark
Let PP be a quicksort program to sort numbers in ascending order. Let t1t_{1} and t2t_{2} be the time taken by the program for the inputs [1 2 3 4]\left[1 \ 2 \ 3 \ 4\right] and [5 4 3 2 1]\left[5 \ 4 \ 3 \ 2 \ 1\right], respectively. Which of the following holds?