Here the main thing to notice is that we need a O($n^{k-1}logn$) solution. For various values of k, k Solution Time Complexity 1 O($n^0logn$) 2 O($n^1logn$) 3 O($n^2logn$) 4 O($n^3logn$)