I have my programm done and I would like to find out it\'s time efficiency.
For this code it\'s O(A+B), where A = arr.length-1 and B=(arr.length - k+1)*n, isn`t it?