Google Coding Interview Question | Leetcode 384 | Shuffle an Array

preview_player
Показать описание
In this video, we introduce how to solve the "Shuffle an Array" question which is used by big tech companies like Google, Facebook, Amazon in coding interviews. We also cover how to behave during a coding interview, e.g. communication, testing, coding style, etc.

Please subscribe to this channel if you like this video. I will keep updating this channel with videos covering different topics in interviews from big tech companies.

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

It would be better if you started with problem explanation, why equal possibilities and discussed brute force too

ruhinapatel
Автор

On line 47. Can you get a random int from 0 to the length of the array - 1, and use that random index to swap with your current index? Will that be accepted/valid shuffle?

angelsancheese
Автор

What about defining the random nums array as int[] randNums = nums.clone(); Since this is shallow copy, all the test cases passes but not sure if this could be a good practice in the real world.

pubamx
join shbcf.ru