GATE / CS ARCHIVE

GATE CSE 2015 SET 3 / QUESTION 37

GATE CSE 2015 Set 3 Q37

Algorithms · Searching, Sorting & Selection · Full GATE CSE 2015 Set 3 paper

GATE 2015 Set 3, Q37 2 marks · MCQ
Report issue

Searching, Sorting & Selection

Question 37, GATE 2015: A mergesort implementation takes 30 seconds in the worst case for an input of size 64. Using its standard asymptotic running-time model, which option most closely approximates the maximum input size solvable in 6 minutes? (A) 256; (B) 512; (C) 1024; (D) 2048.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. Using the standard dominant-term model T(n)=c n log₂n, the time increases by 360/30=12.

2. Hence n log₂n≈12·64·6=4608. For n=512, 512·9=4608, so B. Lower-order implementation overhead is ignored in this approximation.

Original paper, page 65 · Answer key