GATE CSE · Computer Science and Information Technology

Algorithms

Searching, sorting, hashing; complexity analysis; algorithm design techniques; graph algorithms.

Test yourself on Algorithms

5 practice questions for GATE CSE with instant answers — no signup, ~3 minutes.

Take the 5-question quiz →

Study notes are still being prepared.

Don't wait — Shishya can teach you this topic right now, on demand.

Ask Shishya to teach this →

Need more? Ask Shishya

Shishya is your personal tutor for this topic. Pick a starter or open a free chat.

Open Shishya tutor →

Practice this topic

Take a full mock →
  • Q1 · 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?

  • Q2 · 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?

  • Q3 · 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?

  • Q4 · Algorithms · MEDIUM

    A binary min-heap is constructed by inserting the following elements in the given order: 7, 5, 12, 3, 8, 15, 6. After all insertions are complete, what is the value stored at the root of the heap?

  • Q5 · Algorithms · EASY

    What is the time complexity of searching for an element in a balanced binary search tree with n nodes?

Ask Shishya to explain these →