GATE CSE · Computer Science and Information Technology
Searching, sorting, hashing; complexity analysis; algorithm design techniques; graph algorithms.
Test yourself on Algorithms
5 real GATE CSE questions with instant answers — no signup, ~3 minutes.
Study notes are still being prepared.
Don't wait — Shishya can teach you this topic right now, on demand.
Ask Shishya to teach this →Shishya is your personal tutor for this topic. Pick a starter or open a free chat.
Q1 · Algorithms · MEDIUM
Consider a divide-and-conquer algorithm that partitions an array of n elements into three equal parts at each recursive step. If the work done at each level of recursion is Θ(n), and the recursion terminates when the subproblem size becomes 1, what is the time complexity of this algorithm?
Q2 · Algorithms · HARD
A complete binary tree with height h is stored in an array representation. An algorithm computes the sum of all elements in the subtree rooted at index i in O(k) time, where k is the number of nodes in that subtree. What is the worst-case time complexity to compute the sum for all nodes in the tree?
Q3 · Algorithms · HARD
Consider a weighted undirected graph with 6 vertices and the following edges with weights: (A,B,3), (A,C,5), (B,C,2), (B,D,6), (C,D,4), (C,E,7), (D,E,1), (D,F,8), (E,F,3). What is the total weight of the minimum spanning tree using Kruskal's algorithm?
Q4 · Algorithms · HARD
Consider a weighted undirected graph with 6 vertices and 9 edges. Kruskal's algorithm is applied to find the minimum spanning tree. If the edge weights are distinct, what is the maximum number of edges that will be examined before the MST is complete?
Q5 · Algorithms · EASY
What is the time complexity of building a max-heap from an unsorted array of n elements using the standard bottom-up heapify approach?