LeetCode 61 | Rotate List | Solution Explained (Java + Whiteboard)
Vložit
- čas přidán 6. 07. 2020
- Running Time: O(N)
Space Complexity: O(1)
FOLLOW ME:
Github: github.com/xavierelon1
Github HackerRank Solutions: github.com/XavierElon1/Hacker...
Github Leetcode Solutions: github.com/XavierElon1/LeetCo...
Facebook: / xavier.hollingsworth.3
Instagram: / xavierelon
LinkedIn: / xavier-hollingsworth-5...
Twitter: / elon_xavier
Yeyy!! I got 100% with your solution ^^. Thank u so much, Xavier Elon!
I believe your internet speed affects the Leetcode runtime. I ran the same code and got 100%.
Ah that explains it
@@xavierelon yep. I also have 100% with your solution :)
Małgosia Sobocińska yayyyy :)
Hey would you mind explaining why we need line 21? wouldn't this set the linked list back into a cycle if we set the tail's next node to the head?
genius solution 👌 assume 👏 ❤❤❤
great approach bruh! but what's with the hair
Lmao I was growing it out at the time