I submitted a correct and standard solution using the reverse method for rotating an array (O(n) time, O(1) space). However, when I tested the following edge inputs ...
Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become: [4,5,6,7,0,1,2] if it was rotated 4 times. [0,1,2,4 ...
Sommige resultaten zijn verborgen omdat ze mogelijk niet toegankelijk zijn voor u.
Niet-toegankelijke resultaten weergeven