Show the worked solutionMerge sort splits the array into two halves, sorts each recursively, and merges them in linear time:\(T(n)=2T(n/2)+\Theta(n)\).By the Master theorem (case 2, since \(n^{\log_2 2}=n\) matches the \(\Theta(n)\) term), \(T(n)=\Theta(n\log n)\).The splitting and merging do not depend on the input order, so this holds in the best, average and worst case.Answer: \(\Theta(n\log n)\)Click to Join Our Telegram Group for Latest Update of MOCK TEST Click Here to Practice ALL Previous MOCK TEST FREE
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com