Description should clarify that shuffle() always reshuffles

  • 0

    The description calls shuffle() twice. The first time, it says Shuffle the array [1,2,3] and return its result, and the second time, it says Returns the random shuffling of array [1,2,3].

    I thought this meant that it should shuffle the array only once and cache that result, and all subsequent calls to shuffle() would return that cached shuffled array. Turns out you're supposed to reshuffle each time.

Log in to reply

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