My Favorite Problem! | LeetCode in Kotlin:
Автор: Personal Finance with Raymond
Загружено: 2022-07-19
Просмотров: 73
Описание:
Another day, another LeetCode question (for now). Today, I'm running through #234 on LeetCode, Palindrome Linked List. The input provides a list node and asks for a boolean return on whether or not the linked list is a palindrome. My approach used solutions from older LeetCode problems, in particular finding the middle of a linked list and reversing a linked list. By finding the middle of the list and flipping half of it, we can iterate with a two pointer approach to verify if the list is a palindrome.
I work in Kotlin as my LeetCode programming language because my current focus is on Android app development. Kotlin is interoperable with Java, so the solution should be relatively similar albeit with some more boilerplate checks for nulls and such.
Current Grind:
Grind75 list, 22 weeks/7 hours per week, [33/169]
(https://www.techinterviewhandbook.org...)
Chapters:
00:00 - Opening, two pointers galore
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: