Array Shuffle | tech::interview
Shuffle an array of size n such that each element has 1/n probability to remain in its original spot. The best solution has O(n) complexity.Read full article from Array Shuffle | tech::interview
Array Shuffle | tech::interview
Shuffle an array of size n such that each element has 1/n probability to remain in its original spot. The best solution has O(n) complexity.Read full article from Array Shuffle | tech::interview
No comments:
Post a Comment