The official final key gives marks to all. In a straightforward comparison implementation, merge sort makes O(n log n) comparisons and each string comparison can inspect n characters, giving O(n² log n), intended B. With longest-common-prefix information, repeated character scanning can be reduced; the problem does not specify string-comparison implementation or reuse. Preserve universal credit.
More Searching, Sorting and Hashing questions
GATE 2013 CS (CS1) Q16– What is the tightest upper bound on swaps used by selection sort on n numbers?
GATE 2010 CS (CS1) Q62– A ten-slot hash table uses h(k)=k mod 10 and linear probing. Its occupied slots are 2:42,…
GATE 2010 CS (CS1) Q63– A ten-slot hash table uses h(k)=k mod 10 and linear probing. Its occupied slots are 2:42,…
GATE 2015 CS (CS2) Q50– Which integer hash function distributes keys i=0,…,2020 most uniformly over buckets 0,…,9?
GATE 2015 CS (CS3) Q22– A hash table with 25 slots stores 2000 elements. Find its load factor α.
GATE 2021 CS (CS2) Q18– Find the worst-case number of arithmetic operations in recursive binary search on a sorted…