Algorithms
Algorithms
Pick an Algorithms subtopic from the cards below — asymptotics through complexity classes — each tagged with marks weightage, importance, GATE samples, and flashcards.
Learning outcomes
- Compare Θ, O, and Ω on standard examples
- Apply BFS, DFS, Dijkstra, and Kruskal/Prim ideas
- Set up a simple DP recurrence
- Spot the right algorithm from a problem stem
Overview
Algorithms in GATE CSE usually carries about 7–10 marks across asymptotics, sorting/searching, divide & conquer, greedy, DP, graph algorithms, and P/NP basics.
You do not need to write long code — recognise the algorithm, compute a result or complexity, and apply GATE-level correctness ideas.
Use the weightage table to prioritise Must-score topics (sorting, DP, graphs) first, then open each lesson for concepts, samples, practice, and flashcards.
Algorithms as a whole usually contributes about 7–10 marks in GATE CSE. Ranges below split that band across subtopics for revision planning — exact marks vary by year.
| Topic | Typical marks | Importance | Why it matters |
|---|---|---|---|
| Asymptotic Analysis | ~1–1.5 | High | Big-O / Θ / Ω comparisons, growth-rate ordering, and loop-complexity questions appear almost every year. |
| Sorting & Searching | ~1.5–2 | Must-score | Merge, quick, heap and counting/radix sort properties, stability, and comparison counts are repeat favourites. |
| Divide & Conquer | ~0.5–1 | High | Master-theorem style recurrence solving and D&C algorithm costs (merge sort, binary search, Strassen). |
| Greedy Algorithms | ~1–1.5 | High | Activity selection, Huffman coding, fractional knapsack, MST intuition, and the exchange-argument idea. |
| Dynamic Programming | ~1.5–2 | Must-score | LCS, knapsack, matrix-chain, and coin-change style recurrences with table-filling and complexity questions. |
| Graph Algorithms | ~2–3 | Must-score | BFS/DFS, topological sort, Dijkstra, Bellman-Ford, Floyd-Warshall, Kruskal and Prim give the steadiest high-yield marks. |
| Complexity Classes | ~0.5–1 | Moderate | P, NP, NP-hard and NP-complete at MCQ depth: definitions, reductions direction, and classic NPC problems. |
- Must-score Lock these first — short, high-accuracy items.
- High Core building blocks; appear often in MCQ/NAT form.
- Moderate Less frequent, but clean marks when prepared.
Open each subtopic from the left menu (or the cards below). Together they cover about ~28 hours of first-pass Algorithms aligned to the GATE CSE syllabus: asymptotics, sorting & searching, divide & conquer, greedy, DP, graph algorithms, and complexity classes — with GATE-style samples, practice, and flashcards.
Asymptotic Analysis
Big-O, Θ and Ω comparisons are asked almost every year: learn the definitions, the growth-rate ladder, the limit test, and how to turn nested loops into sums — then rank functions in seconds.
02Sorting & Searching
Know every sort by its best/average/worst time, extra space, stability and in-place status, and recall the decision-tree lower bound — these properties drive nearly every sorting MCQ.
03Divide & Conquer
Divide and conquer questions are recurrence-solving questions: recognise the form T(n) = aT(n/b) + f(n), compare n^(log_b a) with f(n), and read off the answer — then handle the odd recurrences by recursion tree.
04Greedy Algorithms
Greedy questions test whether you can recognise the correct greedy criterion, run it by hand (activity selection, Huffman, MST, job sequencing), and know exactly when greedy gives a wrong answer.
05Dynamic Programming
DP questions ask for a recurrence, a table value, or a time/space bound. Learn the standard recurrences (knapsack, LCS, matrix chain, rod cutting, coin change) and practise filling small tables quickly.
06Graph Algorithms
Graph algorithms are the highest-yield part of Algorithms: know BFS/DFS properties, when each shortest-path algorithm applies, every complexity, and how to run Dijkstra and Kruskal by hand.
07Complexity Classes
Complexity questions are definition and recognition questions: know P, NP, NP-hard and NP-complete precisely, the direction of a reduction, the consequences of P = NP, and which classic problems are NP-complete versus easy.
Suggested study order
- Asymptotic Analysis → Sorting & Searching
- Divide & Conquer
- Greedy Algorithms → Dynamic Programming
- Graph Algorithms → Complexity Classes
After each topic, solve previous-year Algorithms questions for that unit. Keep a one-page sheet of Master-theorem cases, sort complexities/stability, classic DP recurrences, and graph algorithm applicability (negative edges, DAG, MST).
Frequently asked questions
Which algorithms are must-know for GATE?
Asymptotics, sorting, searching, BFS/DFS, Dijkstra, MST (Kruskal/Prim), greedy patterns, and basic DP recurrences. Open each subtopic from this hub for a full lesson.
Do I need to code algorithms in the exam?
No. Identify the algorithm, compute complexity or a short result, and reason about correctness at MCQ level.
How to study DP for GATE?
Learn classic patterns (knapsack, LCS, matrix chain style recurrences) and practise recognising overlapping subproblems in stems.
What should I revise in the last month?
Sort complexities and stability, Master-theorem cases, activity selection/Huffman, 0/1 knapsack and LCS tables, Dijkstra vs Bellman-Ford vs Floyd, and Kruskal/Prim. Re-solve recent PYQs under timed conditions.