GATE GUIDE

GATE CSE Algorithms Formula Sheet: Recurrences, Sorting, Graphs, DP

By MD ANISH AHAMADUpdated 9 Oct 20269 min read
GATE CSE Algorithms Formula Sheet: Recurrences, Sorting, Graphs, DP

Algorithms questions in GATE CSE keep reusing a short list of results, from the Master theorem to Catalan numbers. This sheet collects them group by group. Each group has a table, one worked example of my own with the arithmetic shown, and the trap that costs marks.

In this guide
  1. Key takeaways
  2. The terms this sheet uses
  3. Asymptotic notation: five symbols and how they combine
  4. Recurrences: the Master theorem in one table
  5. Recursion trees and the recurrences worth memorising
  6. Sorting: complexity and properties in one table
  7. Searching and hashing: load factor and expected probes
  8. Heaps: height, index arithmetic and linear build-heap
  9. Graph algorithms: complexity depends on the data structure
  10. Dynamic programming: three recurrences and their tables
  11. Greedy: Huffman coding and activity selection
  12. Counting formulas: Catalan numbers and spanning trees
  13. Quick revision

For which topics past papers have asked most, read the Algorithms important topics guide; for the other subjects, use the GATE CSE formula sheet.

Key takeaways

The terms this sheet uses

Logs are base 2 unless a base is written.

Asymptotic notation: five symbols and how they combine

Each symbol is a comparison between two growth rates, valid from some n0n_0 onwards.

Symbol Meaning Useful rule
f=O(g)f = O(g) f(n)≤c g(n)f(n) \le c\,g(n) for some c>0c > 0 Transitive: f=O(g)f = O(g), g=O(h)g = O(h) give f=O(h)f = O(h)
f=Ω(g)f = \Omega(g) f(n)≥c g(n)f(n) \ge c\,g(n) for some c>0c > 0 f=O(g)f = O(g) exactly when g=Ω(f)g = \Omega(f)
f=Θ(g)f = \Theta(g) both OO and Ω\Omega max⁡(f,g)=Θ(f+g)\max(f, g) = \Theta(f + g)
f=o(g)f = o(g) f(n)/g(n)→0f(n)/g(n) \to 0 (log⁡n)k=o(nε)(\log n)^k = o(n^{\varepsilon}) for any k,ε>0k, \varepsilon > 0
f=ω(g)f = \omega(g) f(n)/g(n)→∞f(n)/g(n) \to \infty log⁡(n!)=Θ(nlog⁡n)\log(n!) = \Theta(n \log n)

The growth order to carry into the hall is:

log⁡n≪n≪n≪nlog⁡n≪n2≪nlog⁡n≪2n≪n!\log n \ll \sqrt{n} \ll n \ll n \log n \ll n^{2} \ll n^{\log n} \ll 2^{n} \ll n!

Worked example. Order n10n^{10}, nlog⁡nn^{\log n} and 2n2^{\sqrt{n}}. Take the log of each: 10log⁡n10 \log n, (log⁡n)2(\log n)^2 and n\sqrt{n}. At n=220n = 2^{20} these are 200, 400 and 1024, and each gap keeps widening. So n10=o(nlog⁡n)n^{10} = o(n^{\log n}) and nlog⁡n=o(2n)n^{\log n} = o(2^{\sqrt{n}}).

The trap: f=O(g)f = O(g) does not give 2f=O(2g)2^{f} = O(2^{g}). Take f=2nf = 2n and g=ng = n; the ratio 22n/2n=2n2^{2n}/2^{n} = 2^{n} grows without bound.

Recurrences: the Master theorem in one table

A divide-and-conquer algorithm makes aa calls on inputs of size n/bn/b and spends f(n)f(n) splitting and combining:

T(n)=a T(n/b)+f(n),c=log⁡baT(n) = a\,T(n/b) + f(n), \qquad c = \log_b a

Here a≥1a \ge 1, b>1b > 1, and ncn^{c} is the work at the leaves.

Case Condition on f(n)f(n) Solution
1 f(n)=O(nc−ε)f(n) = O(n^{c - \varepsilon}) for some ε>0\varepsilon > 0 Θ(nc)\Theta(n^{c})
2 f(n)=Θ(nclog⁡kn)f(n) = \Theta(n^{c} \log^{k} n) with k≥0k \ge 0 Θ(nclog⁡k+1n)\Theta(n^{c} \log^{k+1} n)
3 f(n)=Ω(nc+ε)f(n) = \Omega(n^{c + \varepsilon}) and a f(n/b)≤d f(n)a\,f(n/b) \le d\,f(n), d<1d < 1 Θ(f(n))\Theta(f(n))

The regularity condition in Case 3 says the work shrinks by a fixed factor at each level down, so the root's cost dominates the whole tree.

Worked example. One Case 2 and one Case 3, with d=12\displaystyle d = \tfrac{1}{2}:

T(n)=2T(n/4)+n:c=log⁡42=12, f(n)=Θ(n1/2log⁡0n)⇒Θ(n log⁡n)T(n)=2T(n/2)+n2:c=1, 2(n2)2=12 n2≤12 f(n)⇒Θ(n2)\begin{aligned} T(n) &= 2T(n/4) + \sqrt{n}: && c = \log_4 2 = \tfrac{1}{2},\ f(n) = \Theta(n^{1/2} \log^{0} n) && \Rightarrow \Theta(\sqrt{n}\,\log n) \\ T(n) &= 2T(n/2) + n^{2}: && c = 1,\ 2\left(\tfrac{n}{2}\right)^{2} = \tfrac{1}{2}\,n^{2} \le \tfrac{1}{2}\,f(n) && \Rightarrow \Theta(n^{2}) \end{aligned}

Trap: The gap must be polynomial. 2T(n/2)+nlog⁡n2T(n/2) + n \log n is Case 2 with k=1k = 1, giving Θ(nlog⁡2n)\Theta(n \log^2 n). 2T(n/2)+n/log⁡n2T(n/2) + n/\log n sits at k=−1k = -1 and gives Θ(nlog⁡log⁡n)\Theta(n \log \log n), not Θ(n)\Theta(n).

Recursion trees and the recurrences worth memorising

When the split is unequal, add the cost level by level instead. If the level sums shrink geometrically, the top level dominates. If they stay equal, multiply one level by the depth. If they grow, the leaves dominate.

Worked example. For T(n)=T(n/2)+T(n/4)+nT(n) = T(n/2) + T(n/4) + n, the level sums are nn, 34n\displaystyle \tfrac{3}{4}n, 916n\displaystyle \tfrac{9}{16}n, and so on:

∑i≥0(34)in=n1−3/4=4n⇒T(n)=Θ(n)\sum_{i \ge 0} \left(\tfrac{3}{4}\right)^{i} n = \frac{n}{1 - 3/4} = 4n \quad\Rightarrow\quad T(n) = \Theta(n)

These solutions come up often enough to learn by heart:

Recurrence Solution Recurrence Solution
T(n−1)+1T(n-1) + 1 Θ(n)\Theta(n) 2T(n/2)+n2T(n/2) + n Θ(nlog⁡n)\Theta(n \log n)
T(n−1)+nT(n-1) + n Θ(n2)\Theta(n^{2}) 4T(n/2)+n24T(n/2) + n^{2} Θ(n2log⁡n)\Theta(n^{2} \log n)
T(n−1)+log⁡nT(n-1) + \log n Θ(nlog⁡n)\Theta(n \log n) 8T(n/2)+n28T(n/2) + n^{2} Θ(n3)\Theta(n^{3})
T(n−1)+1/nT(n-1) + 1/n Θ(log⁡n)\Theta(\log n) T(n)+1T(\sqrt{n}) + 1 Θ(log⁡log⁡n)\Theta(\log \log n)
T(n/2)+1T(n/2) + 1 Θ(log⁡n)\Theta(\log n) T(n/3)+T(2n/3)+nT(n/3) + T(2n/3) + n Θ(nlog⁡n)\Theta(n \log n)
T(n/2)+nT(n/2) + n Θ(n)\Theta(n) 2T(n−1)+12T(n-1) + 1 Θ(2n)\Theta(2^{n})
2T(n/2)+12T(n/2) + 1 Θ(n)\Theta(n) T(n−1)+T(n−2)+1T(n-1) + T(n-2) + 1 Θ(ϕn)\Theta(\phi^{n})

The trap: two calls on n−1n - 1 double the work at every level, so 2T(n−1)+12T(n-1) + 1 is exponential, not linear. The recurrence relations guide covers substitution and change of variable in full.

Sorting: complexity and properties in one table

Algorithm Best Average Worst Stable In place
Insertion Θ(n)\Theta(n) Θ(n2)\Theta(n^{2}) Θ(n2)\Theta(n^{2}) Yes Yes
Bubble (early exit) Θ(n)\Theta(n) Θ(n2)\Theta(n^{2}) Θ(n2)\Theta(n^{2}) Yes Yes
Selection Θ(n2)\Theta(n^{2}) Θ(n2)\Theta(n^{2}) Θ(n2)\Theta(n^{2}) No Yes
Merge Θ(nlog⁡n)\Theta(n \log n) Θ(nlog⁡n)\Theta(n \log n) Θ(nlog⁡n)\Theta(n \log n) Yes No, Θ(n)\Theta(n) extra
Quick Θ(nlog⁡n)\Theta(n \log n) Θ(nlog⁡n)\Theta(n \log n) Θ(n2)\Theta(n^{2}) No Yes, stack only
Heap Θ(nlog⁡n)\Theta(n \log n) Θ(nlog⁡n)\Theta(n \log n) Θ(nlog⁡n)\Theta(n \log n) No Yes
Counting, keys in 0..k0..k Θ(n+k)\Theta(n + k) Θ(n+k)\Theta(n + k) Θ(n+k)\Theta(n + k) Yes No
Radix, dd digits Θ(d(n+k))\Theta(d(n + k)) Θ(d(n+k))\Theta(d(n + k)) Θ(d(n+k))\Theta(d(n + k)) Yes No

Insertion sort makes inversions +(n−1)+ (n - 1) comparisons, minus one for each key that moves to the front. Selection sort always makes n(n−1)/2n(n-1)/2 comparisons and at most n−1n - 1 swaps. Any comparison sort needs ⌈log⁡2n!⌉\lceil \log_2 n! \rceil comparisons in the worst case.

Worked example. Insertion sort on [3,1,2,5,4][3, 1, 2, 5, 4]. The inversions are (3,1)(3,1), (3,2)(3,2) and (5,4)(5,4), so there are 3. Only the key 1 moves to the front. The count is 3+4−1=63 + 4 - 1 = 6 comparisons. The comparison lower bound, ⌈log⁡2120⌉=7\lceil \log_2 120 \rceil = 7, applies to the worst input, not this one.

The trap: quicksort with a first-element pivot hits its Θ(n2)\Theta(n^{2}) worst case on already sorted input.

Searching and hashing: load factor and expected probes

Binary search on a sorted array makes at most ⌊log⁡2n⌋+1\lfloor \log_2 n \rfloor + 1 comparisons.

Scheme Unsuccessful search Successful search
Chaining 1+α1 + \alpha about 1+α/21 + \alpha/2
Linear probing 12(1+1(1−α)2)\displaystyle \frac{1}{2}\left(1 + \frac{1}{(1 - \alpha)^{2}}\right) 12(1+11−α)\displaystyle \frac{1}{2}\left(1 + \frac{1}{1 - \alpha}\right)
Uniform (double) hashing 11−α\displaystyle \frac{1}{1 - \alpha} 1αln⁡11−α\displaystyle \frac{1}{\alpha} \ln \frac{1}{1 - \alpha}

Worked example. At α=0.75\alpha = 0.75, chaining needs 1.75 probes for an unsuccessful search and 1.375 for a successful one. Linear probing needs 8.5 and 2.5. Uniform hashing needs 4 and about 1.85. Primary clustering explains the gap.

Remember: GATE counts the empty slot where a search stops as a probe. Binary search on a linked list is O(n)O(n), because reaching the middle element is itself a walk.

Heaps: height, index arithmetic and linear build-heap

Quantity Formula
Parent and children, 1-based ⌊i/2⌋\lfloor i/2 \rfloor; 2i2i and 2i+12i + 1
Parent and children, 0-based ⌊(i−1)/2⌋\lfloor (i-1)/2 \rfloor; 2i+12i + 1 and 2i+22i + 2
Height of an nn-node heap ⌊log⁡2n⌋\lfloor \log_2 n \rfloor
Leaves and internal nodes ⌈n/2⌉\lceil n/2 \rceil leaves at ⌊n/2⌋+1\lfloor n/2 \rfloor + 1 to nn; ⌊n/2⌋\lfloor n/2 \rfloor internal
Insert, extract-max O(log⁡n)O(\log n) each
Build-heap ⌊n/2⌋\lfloor n/2 \rfloor sift-downs, at most 2n2n comparisons, Θ(n)\Theta(n)
Heaps on nn distinct keys H(n)=(n−1L)H(L) H(n−1−L)H(n) = \binom{n-1}{L} H(L)\,H(n-1-L), LL the left-subtree size

Build-heap is linear because at most ⌈n/2h+1⌉\lceil n/2^{h+1} \rceil nodes have height hh, and each costs O(h)O(h):

∑h=0⌊log⁡n⌋⌈n2h+1⌉O(h)=O ⁣(n∑h≥0h2h)=O(2n)=O(n)\sum_{h=0}^{\lfloor \log n \rfloor} \left\lceil \frac{n}{2^{h+1}} \right\rceil O(h) = O\!\left(n \sum_{h \ge 0} \frac{h}{2^{h}}\right) = O(2n) = O(n)

Worked example. A heap of 20 nodes has height ⌊log⁡220⌋=4\lfloor \log_2 20 \rfloor = 4. Nodes 11 to 20 are its 10 leaves, so build-heap starts sifting down at node 10. For 5 distinct keys the left subtree holds 3 nodes and the right 1, so H(5)=(43)×2×1=8H(5) = \binom{4}{3} \times 2 \times 1 = 8 max-heaps.

The trap: applying the 1-based parent formula to a 0-based array.

The book's last-minute revision sheet adds step-by-step procedures for Dijkstra, Kruskal, Prim, BFS, DFS, build-heap and partition, with what GATE asks about each, plus a traps table. It is part of the GATE CSE 2027 book.

Graph algorithms: complexity depends on the data structure

Algorithm Structure Time Note
BFS, DFS Adjacency list Θ(V+E)\Theta(V + E) Θ(V2)\Theta(V^{2}) with a matrix
Topological sort, DAG shortest path Adjacency list Θ(V+E)\Theta(V + E) Negative edges allowed in a DAG
Dijkstra Array O(V2)O(V^{2}) Non-negative weights
Dijkstra Binary heap O((V+E)log⁡V)O((V + E) \log V) Best for sparse graphs
Dijkstra Fibonacci heap O(E+Vlog⁡V)O(E + V \log V) Fastest of the three
Bellman–Ford Edge list O(VE)O(VE) V−1V - 1 passes; pass VV finds a negative cycle
Floyd–Warshall Matrix Θ(V3)\Theta(V^{3}) time, Θ(V2)\Theta(V^{2}) space All pairs
Prim Binary heap O(Elog⁡V)O(E \log V) O(V2)O(V^{2}) with an array
Kruskal Sort and union–find O(Elog⁡E)=O(Elog⁡V)O(E \log E) = O(E \log V) Since E≤V2E \le V^{2}

Worked example. Take V=1000V = 1000, so log⁡2V≈9.97\log_2 V \approx 9.97. With E=5000E = 5000, the array version of Dijkstra costs about V2=106V^{2} = 10^{6} steps, and the heap version about 6000×9.97≈6×1046000 \times 9.97 \approx 6 \times 10^{4}. In the complete graph, E=1000×999/2=499,500E = 1000 \times 999/2 = 499{,}500, and the heap version costs about 5×1065 \times 10^{6}, so the array wins.

Trap: Adding a constant to every edge weight keeps the MST but can change shortest paths, because a path with more edges gains more. Multiplying every weight by a positive constant changes neither.

Dynamic programming: three recurrences and their tables

Problem Recurrence Table Time
LCS of lengths mm, nn L[i][j]=L[i−1][j−1]+1L[i][j] = L[i-1][j-1] + 1 if xi=yjx_i = y_j, else max⁡(L[i−1][j],L[i][j−1])\max(L[i-1][j], L[i][j-1]) (m+1)(n+1)(m+1)(n+1) Θ(mn)\Theta(mn)
0/1 knapsack, capacity WW K[i][w]=max⁡(K[i−1][w], vi+K[i−1][w−wi])K[i][w] = \max(K[i-1][w],\ v_i + K[i-1][w - w_i]) (n+1)(W+1)(n+1)(W+1) Θ(nW)\Theta(nW)
Matrix chain, nn matrices m[i][j]=min⁡i≤k<j(m[i][k]+m[k+1][j]+pi−1pkpj)m[i][j] = \min_{i \le k < j} (m[i][k] + m[k+1][j] + p_{i-1} p_k p_j) n×nn \times n Θ(n3)\Theta(n^{3})

In the matrix chain row, matrix AiA_i has dimensions pi−1×pip_{i-1} \times p_i. The knapsack's second option applies only when wi≤ww_i \le w.

Worked example. Take AA as 4×104 \times 10, BB as 10×310 \times 3 and CC as 3×123 \times 12, so p=(4,10,3,12)p = (4, 10, 3, 12):

(AB)C=4⋅10⋅3+4⋅3⋅12=120+144=264A(BC)=10⋅3⋅12+4⋅10⋅12=360+480=840\begin{aligned} (AB)C &= 4 \cdot 10 \cdot 3 + 4 \cdot 3 \cdot 12 = 120 + 144 = 264 \\ A(BC) &= 10 \cdot 3 \cdot 12 + 4 \cdot 10 \cdot 12 = 360 + 480 = 840 \end{aligned}

The minimum is 264 scalar multiplications.

The trap: nn matrices have Cn−1C_{n-1} parenthesisations, not CnC_n, so three matrices have C2=2C_2 = 2.

Greedy: Huffman coding and activity selection

Algorithm Greedy rule Time Key fact
Huffman Merge the two lowest frequencies O(nlog⁡n)O(n \log n) with a heap Total bits =∑fiℓi= \sum f_i \ell_i; n−1n - 1 internal nodes
Activity selection Pick the earliest finish time that fits O(nlog⁡n)O(n \log n) to sort One linear pass once sorted
Fractional knapsack Highest value per unit weight first O(nlog⁡n)O(n \log n) 0/1 knapsack needs DP

Worked example. Frequencies a: 2, b: 3, c: 5, d: 7, e: 13, total 30. The merges are 2+3=52 + 3 = 5, 5+5=105 + 5 = 10, 7+10=177 + 10 = 17 and 13+17=3013 + 17 = 30. Code lengths are e 1, d 2, c 3, a 4, b 4, so the total is:

2⋅4+3⋅4+5⋅3+7⋅2+13⋅1=62 bits2 \cdot 4 + 3 \cdot 4 + 5 \cdot 3 + 7 \cdot 2 + 13 \cdot 1 = 62 \text{ bits}

The merge weights 5+10+17+305 + 10 + 17 + 30 give the same 62. A fixed 3-bit code needs 90.

The trap: tie-breaking can change one symbol's code length but never the total bits.

Counting formulas: Catalan numbers and spanning trees

Cn=1n+1(2nn):1,1,2,5,14,42,132,429,1430,4862,16796(n=0,…,10)C_n = \frac{1}{n + 1}\binom{2n}{n}: \quad 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796 \quad (n = 0, \dots, 10)
Count Formula Value at n=4n = 4
BSTs on nn distinct keys CnC_n 14
Binary tree shapes, stack permutations CnC_n 14
Labelled binary trees Cn×n!C_n \times n! 336
Parenthesisations of nn matrices Cn−1C_{n-1} 5
Edges in KnK_n n(n−1)/2n(n-1)/2 6
Spanning trees of KnK_n nn−2n^{n-2} 16
Spanning trees of a cycle on nn vertices nn 4
Spanning trees of Km,nK_{m,n} mn−1nm−1m^{n-1} n^{m-1} 4096 when m=4m = 4

Worked example. Check 42=164^{2} = 16 for K4K_4 by hand. It has 6 edges, so (63)=20\binom{6}{3} = 20 three-edge subsets. Three edges on four vertices fail to be a tree only when they form a triangle, and K4K_4 has (43)=4\binom{4}{3} = 4 triangles. That leaves 20−4=1620 - 4 = 16.

In one line: nn−2n^{n-2} counts labelled spanning trees, distinct edge sets on named vertices, not tree shapes.

The graph theory questions guide covers the rest of the counting family, and the time complexity questions guide turns these bounds into loop-counting practice.

Quick revision

  1. Master theorem: compare f(n)f(n) with nlog⁡ban^{\log_b a}; Case 2 adds one log; Case 3 needs a f(n/b)≤d f(n)a\,f(n/b) \le d\,f(n), d<1d < 1.
  2. 2T(n/2)+nlog⁡n=Θ(nlog⁡2n)2T(n/2) + n \log n = \Theta(n \log^2 n); 2T(n−1)+1=Θ(2n)2T(n-1) + 1 = \Theta(2^{n}); T(n)+1=Θ(log⁡log⁡n)T(\sqrt{n}) + 1 = \Theta(\log \log n).
  3. Stable: insertion, bubble, merge, counting, radix. Not in place: merge, counting, radix.
  4. Chaining 1+α1 + \alpha; linear probing 12(1+1/(1−α)2)\displaystyle \frac{1}{2}(1 + 1/(1 - \alpha)^{2}) unsuccessful; count the empty slot.
  5. Heap height ⌊log⁡2n⌋\lfloor \log_2 n \rfloor, ⌈n/2⌉\lceil n/2 \rceil leaves, build-heap Θ(n)\Theta(n).
  6. Dijkstra O(V2)O(V^{2}) array or O((V+E)log⁡V)O((V + E) \log V) heap; Bellman–Ford O(VE)O(VE); Floyd–Warshall Θ(V3)\Theta(V^{3}).
  7. LCS Θ(mn)\Theta(mn), knapsack Θ(nW)\Theta(nW), matrix chain Θ(n3)\Theta(n^{3}) with Cn−1C_{n-1} parenthesisations.
  8. Huffman total bits =∑fiℓi== \sum f_i \ell_i = sum of merge weights; KnK_n has nn−2n^{n-2} spanning trees.

Frequently asked questions

What are the three cases of the Master theorem?

For T(n)=a T(n/b)+f(n)T(n) = a\,T(n/b) + f(n), let c=log⁡bac = \log_b a. If f(n)f(n) is polynomially smaller than ncn^c, the answer is Θ(nc)\Theta(n^c). If f(n)=Θ(nclog⁡kn)f(n) = \Theta(n^c \log^k n) with k≥0k \ge 0, the answer is Θ(nclog⁡k+1n)\Theta(n^c \log^{k+1} n). If f(n)f(n) is polynomially larger and a f(n/b)≤d f(n)a\,f(n/b) \le d\,f(n) for some d<1d < 1, the answer is Θ(f(n))\Theta(f(n)).

Which sorting algorithms are stable and which are in place?

Insertion, bubble, merge, counting and radix sort are stable. Insertion, bubble, selection, heapsort and quicksort are in place, with quicksort using only its recursion stack. Merge sort on arrays is stable but needs linear extra space, so it is not in place. Quicksort and heapsort are in place but not stable. Counting sort is stable but not in place.

What is the expected number of probes for linear probing?

With load factor α=n/m\alpha = n/m, an unsuccessful search or insertion with linear probing takes about 12(1+1(1−α)2)\displaystyle \frac{1}{2}\left(1 + \frac{1}{(1 - \alpha)^2}\right) probes and a successful search about 12(1+11−α)\displaystyle \frac{1}{2}\left(1 + \frac{1}{1 - \alpha}\right). At α=0.75\alpha = 0.75 these are 8.5 and 2.5. Chaining needs only 1+α1 + \alpha probes for an unsuccessful search. GATE counts the empty slot where a search stops as a probe.

What is the time complexity of Dijkstra's algorithm?

It depends on the priority queue. With a plain array Dijkstra runs in O(V2)O(V^2), with a binary heap in O((V+E)log⁡V)O((V + E) \log V) and with a Fibonacci heap in O(E+Vlog⁡V)O(E + V \log V). The array version suits dense graphs and the heap version suits sparse ones. All three need non-negative edge weights for the guarantee to hold.

How many binary search trees can be formed with n distinct keys?

The number is the Catalan number Cn=1n+1(2nn)\displaystyle C_n = \frac{1}{n + 1}\binom{2n}{n}. The first values, for n from 0 to 10, are 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862 and 16796, so 4 keys give 14 trees. The same number counts unlabelled binary tree shapes and stack permutations. Labelled binary trees number Cn×n!C_n \times n!.

Sources

Dates, fees and the syllabus are set by the GATE 2027 organising institute and can change. Always confirm at gate2027.iitm.ac.in.

Keep reading

GATE CSE 2027 book1,020 pages · ₹250 ₹300
Buy now — ₹250