I have a question regarding to the maxArray( ) method. My understanding is that it will return the maximum number of one array with length of k.
Say, if we have nums = [4, 5, 1] and k = 2, it should return [4, 5]. But seems it will return [5, 1]. Is it a bug or is my understanding wrong? I looked into some other solutions and seems they all have the same result [5, 1].