Hi, folks! Today I solved three interesting problems on LeetCode : Palindrome linked list, Linked list cycle and Flatten Multilevel doubly linked list. As a Beginner, I felt Flatten Multilevel doubly linked list problem to be a bit challenging. We need to find a perfect recursive approach to solve this problem in efficient way. To determine the correct base condition and recursive function, we need to think in many possible approaches and dry run the code carefully. I also used some resources for the better understanding.
Linked list cycle is a conceptual problem that introduces a new type in linked list called a circular linked list. This problem helped me to gain conceptual clarity on circular linked list.
Palindrome linked list problem is having many ways to solve. One of them is using stack data structure and the another way is dividing the linked list into manageable parts and then comparing them. The second approach seems to be a bit lengthy, but it becomes easier when you divide the task into sub tasks and implement them in separate functions. This will make process simplify.
I hope my experiences will be helpful.
Top comments (0)