GATE 2015 Algorithm Questions: 13 PYQs Across 5 Topic Families

See how 13 GATE 2015 Algorithm PYQs divide across five topic families, then work the recurrences, MST constraints, runtime scaling and asymptotic traps.

KnowledgeGate Team

Exam prep & CS education

Updated 29 Nov 20266 min read
GATE 2015 Algorithm Questions: 13 PYQs Across 5 Topic Families

A year-wise answer list hides the solving moves that GATE 2015 combined. The 13 PYQs span five topic families and three paper sets, with one question lacking a set label. Use the official archive for the original paper wording. Compare this sorting-heavy, 13-question set with Sorting Algorithms: Complexity and Comparison, where five different PYQs include two Marks to All outcomes.

GATE 2015 Algorithm questions: the 13-question map

Question reference

Set

Type

Topic and subtopic

Tested move

Answer

GATE exam hub (question page unavailable)

Set 1

MCQ

Minimum Spanning Trees, Prim

match four algorithms to four design paradigms

P-ii, Q-iii, R-iv, S-i

GATE exam hub (question page unavailable)

Set 1

MCQ

Sorting, Quick Sort

model the worst partition recurrence

T(n)=T(n-1)+T(1)+cn

GATE exam hub (question page unavailable)

Set 1

MCQ

Sorting, Comparisons and Searching

compare total costs for an operation mix

unsorted array

GATE exam hub (question page unavailable)

Set 1

NAT

Minimum Spanning Trees, Prim

assign the least legal non-tree edge weights

69

GATE exam hub (question page unavailable)

Set 1

MCQ

Time Complexity, Iterative Loops

count a log-inside-log loop

Theta(n log log n)

GATE exam hub (question page unavailable)

Set 2

MCQ

Sorting, Comparisons and Searching

find one element that is neither extreme

Theta(1)

GATE exam hub (question page unavailable)

Set 2

MCQ

Dynamic Programming, Advanced Mix

match Dijkstra, Floyd-Warshall, binary search, and backtracking to paradigms

greedy, DP, divide and conquer, DFS

GATE exam hub (question page unavailable)

Set 2

MCQ

Sorting, Quick Sort

reconstruct Quickselect's two recursive argument lists

option 1

GATE exam hub (question page unavailable)

Set 3

MCQ

Algorithm Analysis, Growth Rates

classify the sum of cubes

I, III, and IV, but not II

GATE exam hub (question page unavailable)

Set 3

MCQ

Sorting, Merge Sort

scale n log n runtime from 30 seconds to 6 minutes

512

GATE exam hub (question page unavailable)

Set 3

NAT

Minimum Spanning Trees, Prim

update an MST after adding a constant to every edge

995

GATE exam hub (question page unavailable)

Set 3

MCQ

Algorithm Analysis, Growth Rates

compare n with an oscillating exponent

neither I nor II

GATE exam hub (question page unavailable)

no set label

MCQ

Algorithm Analysis, Growth Rates

order sublinear, linear, quadratic, and exponential functions

f1 < f2 < f4 < f3

In these 13 questions, Sorting contributes 5, MST 3, Algorithm Analysis 3, Dynamic Programming 1, and Time Complexity Analysis 1. The formats total 11 MCQ + 2 NAT; the paper-set labels total 5 + 3 + 4, with one unlabelled question. Treat these as practice categories, not official subject weightage. Use the GATE previous-year question-paper archive for the original papers.

GATE 2015 Sorting questions: recurrence, operation mix, and constant work

In 3313's worst case, the pivot leaves sizes n-1 and 0: T(n)=T(n-1)+T(1)+cn. For n=5, partition work is 5c+4c+3c+2c=14c, plus base constants. The series gives Theta(n^2); 2T(n/2)+cn would describe a balanced split.

For 3359, an unsorted array makes N inserts Theta(N). With direct positions, deletes or decrease-key operations stay constant, while sqrt(log N) linear finds total Theta(N sqrt(log N)). A min-heap already spends Theta(N log N) on inserts, so the unsorted array wins the aggregate workload.

For 3380, take any three distinct elements and return their median. One chosen value is smaller and one larger, so it cannot be a global extreme. Constant comparisons give Theta(1).

GATE 2015 Quickselect and Merge Sort: track the subproblem precisely

For 3413, if left_end+1 > k, recurse on (a, left_end, k). Otherwise use (a+left_end+1, n-left_end-1, k-left_end-1). The second call moves past the pivot, shrinks the array, and converts k to the right subarray's local rank.

Merge Sort scales as n log2 n. At n=64, 64 x 6=384 units take 30 seconds. Six minutes is 12 times longer, so the target is 12 x 384=4608. Since 512 x 9=4608, the answer is 512. Scale n log n, not n alone. See Sorting Algorithms: Complexity and Comparison for the broader comparison.

GATE 2015 MST questions: path constraints and a constant edge shift

MST edge subtotal 36 plus path-constrained weights 10, 7, and 16 yields 69.

For 3362, MST edges AC=9, BC=2, BE=15, EF=4, and DF=6 total 36. The path maxima for AB, ED, and CD are 9, 6, and 15, so their least distinct legal integers are 10, 7, and 16. Therefore 36+10+7+16=69. A lower value would replace an edge on the stated tree path.

For 3484, a tree on 100 vertices has 99 edges. Adding 5 to every graph edge adds 99 x 5=495 to every spanning tree, so their ordering is unchanged. The new MST weight is 500+495=995; the graph's 300-edge count is irrelevant.

For the paradigm matches, Prim and Dijkstra are greedy, Floyd-Warshall is DP, Merge Sort and binary search are divide and conquer, and Hamiltonian backtracking follows DFS.

Weighted six-vertex graph reconstruction for the 69 calculation, with an MST subtotal of 36 and non-tree edge values of 10, 7, and 16.

GATE 2015 Algorithm Analysis: nested logs, sums, and oscillation

With n=256, the outer loop runs 255 times. Halving visits 256,128,64,32,16,8,4,2, so p=8; k=1,2,4 then gives three increments. Thus q=255 x 3=765. Generally the factors are Theta(n) and Theta(log log n), producing Theta(n log log n).

Also, sum(i^3)=[n(n+1)/2]^2=Theta(n^4). Therefore I, III (O(n^5)), and IV (Omega(n^3)) hold, but II (Theta(n^5)) does not. Big-O and Omega permit loose bounds; Theta must be tight.

For f(n)=n and g(n)=n^(1+sin n), integer subsequences place sin n above 1/2 and below -1/2 infinitely often. Along the first, f/g=n^(-sin n) tends to 0; along the second, it grows without bound. Therefore neither f=O(g) nor f=Omega(g) holds.

GATE 2015 Algorithm difficulty read: reasoning load, not an official label

No difficulty rating was provided for any of the 13 questions, so these are editorial reasoning bands rather than official labels.

Reasoning band

Records

Recognition with a decisive fact

two paradigm matches; median of three

Model or trace

Quick Sort, operation mix, Quickselect, nested logs, cubes, function ordering

Multi-step construction or proof

69 edge assignment, scaling to 512, 995 shift, oscillating exponent

Trap

What goes wrong

Repair

central or first pivot sounds balanced

writes 2T(n/2)

inspect partition sizes

many operations mention a heap

optimises one operation

multiply counts by costs

add 5 to 300 graph edges

gets 2,000

count 99 tree edges

three nested loops

writes n log n or n(log n)^2

recognise log p=log log n

one observed subsequence

asserts O or Omega

test both extremes

The recurring move is selecting the model before calculating. This historical split does not predict later papers.

GATE 2015 Algorithm revision: four blank-sheet checks

  1. Worst-case Quick Sort: expand T(n)=T(n-1)+T(1)+cn to 14c at n=5.

  2. MST path constraints: derive non-tree weights 10, 7, and 16, then total 69.

  3. Merge Sort scaling: convert 30 seconds to 360 and solve n log2 n=4608 to get 512.

  4. Nested-loop trace: count p=8 and three inner steps across 255 outer iterations to reach 765.

For any miss, write the modelling decision before repeating the calculation: partition sizes, maximum-on-path constraint, runtime scale factor, or loop-bound transformation.

Need

Best next page

Why

choose the relevant GATE route

GATE CS Exam Preparation

see the wider preparation path

rebuild Algorithm concepts in syllabus sequence

GATE Guidance by Sanchit Sir

repair concept gaps systematically

apply known concepts in topic-wise and mock practice

GATE Test Series

practise selection under time pressure

The practice bank currently offers over 1,200 Algorithm questions for broader practice; only 13 belong to this GATE 2015 set.

The short version

These 13 questions reward model selection before calculation. Name the recurrence, aggregate cost, path maximum, invariant, or asymptotic relation first, then test the result against the stem's exact operation. A memorised answer will not transfer if the model is wrong.