What is rotated sorted array?


  • 0
    L

    given sorted array,

    [[1,2,3]
    [4,5,6]
    [7,8,9]]
    

    is

    [[1,4,7]
    [2,5,8]
    [3,6,9]]
    

    the rotated sorted array?

    Thanks a lot


  • 0
    L

    It has nothing to do with 2D matrix. You may find the instruction in Find Minimum in Rotated Sorted Array.

    Suppose a sorted array is rotated at some pivot unknown to you beforehand.
    (i.e., [0 1 2 4 5 6 7] might become [4 5 6 7 0 1 2], and [4 5 6 7 0 1 2] is the rotated sorted one).


  • 0
    L

    Thank you, @lizhuogo for the clarification.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.