Detecting Duplicates in Integer Array in O(n) Time Complexity w/ Python

preview_player
Показать описание
Just a quick code explanation of an interesting problem I saw on leetcode. I'm aware there's a better way to do it that doesn't use extra space by inverting input_array[abs(n) - 1] but in terms of runtime, that solution is almost twice as slow and I find it more obscure in terms of intuition.
Рекомендации по теме
Комментарии
Автор

Thanks for the video! My humble guess is that the algorithm works as expected only if all items in the list are positive, not negative.

michal.nalevanko
Автор

Hi just wanted to know why haven't you been uploading lately?

drac
Автор

Hi, Jake i like your flask videos series about "Reddit Clone". I know you are probably busy but it will be great if you can finish it. Thanks

quranvibes-lz
join shbcf.ru