Leetcode 287. Find the Duplicate Number - Microsoft Interview Question

preview_player
Показать описание
Today I solve and explain very quickly a medium level difficulty leetcode algorithm using Python3 called "287. Find the Duplicate Number". This is a popular Microsoft Interview problem using Floyd's Cycle Detection Algorithm.

If you found this helpful Like and Subscribe! I solve LeetCode Algorithms (Python/ Java) and SQL Problems daily!

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

Hope this helped! Let me know what you want to see next! 😄

codewithcarter
Автор

Hmm, I kinda miss the point where you explain why the reset actually works..
Does it require to have a certain amount of items or does the cycle needs to have a certain length?
Cause I read that it doesnt matter where the pointers meet initially, resetting will always make sure you get the start. But thats complete nonsense right?
Cause if i have a list 1-2-3-4-5-6 and a cycle 456 with 6 pointing to 4, thats mathematically not possible, right?

adennis
Автор

great video! what program do you use to write on the screen?

algopenne
Автор

thanks for the explanation, how did you integrate vim in leetcode?

ayoubelhioui
Автор

Do we need the first while loop? Because if there isn’t a duplicate, then won’t it just run indefinitely?

Sonyemman
visit shbcf.ru