Leetcode 234 - Palindrome Linked List (Java, Solution Explained)

preview_player
Показать описание
Leetcode 234 - Palindrome Linked List.

If you like this video, please 'Like' or 'Subscribe'. This is really helpful for my channel and also motivates me to do more. My goal is to finish 100 Leetcode problems in the following months. Stay tuned!
Рекомендации по теме
Комментарии
Автор

I just can not understand why your code reversing the second part. As I get it: with using of the loop we assigned slow to "6-->7-->8" and than we reverse it, so it has to be "8-->7-->6". And than we compare "8-->7-->6" with the original "6-->7-->8-->7-->6". How did we manage to reverse exactly the second part?

iakovsborshchik