When Quicksort uses the first element as the pivot:
Input 1:[1 2 3 4 5] is already sorted.
Partitioning an already sorted array of size n using the first element results in the worst-case behavior with unbalanced partitions of sizes 0 and n−1.
The number of comparisons made is:
t1=(n−1)+(n−2)+⋯+1=4+3+2+1=10
Input 2:[4 1 5 3 2]
First pivot is 4, which partitions into elements smaller than 4 ([1, 3, 2]) and elements greater than 4 ([5]), requiring 4 comparisons.
Sub-array [1, 3, 2] with pivot 1 splits into [] and [3, 2], requiring 2 comparisons.
Sub-array [3, 2] with pivot 3 requires 1 comparison.
Sub-array [5] has size 1 (0 comparisons).
Total comparisons t2=4+2+1=7.
Since t1=10 and t2=7, we have t1>t2. Hence, (C) is the correct option.