384. Shuffle an Array (Leetcode Medium)

preview_player
Показать описание
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits!

#leetcode #coding #programming
Рекомендации по теме
Комментарии
Автор

I found out this algorithm has a name after solving it on leetcode. The problem is i tried get time in nanosecond from time module and doing module did modulo n. This wasn't passing some test cases. It worked when i triend pythons PRNG to get random interger. Still wonder why.

bereketyisehak
Автор

What is the interview asks you how will you test this code? Any particular strategies?

gs