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.
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.
- Go deeper on this topicGo deeper on Algorithms for GATE CSE — examples and edge cases I should know.
- Show me exam shortcutsGive me 3 fastest shortcuts to solve Algorithms questions in the exam.
- What mistakes should I avoid?What are the most common mistakes students make on Algorithms? How do I avoid them?
- Quiz me adaptivelyQuiz me on Algorithms — start with one easy question, then go harder based on how I answer.
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?