Saturday, July 21, 2018

Leetcode 143: Reorder the list

July 21, 2018

Introduction


It is the medium level algorithm. I came out the idea how to solve the algorithm, find the second half, reverse second half as a linked list, and then merge two linked list. I checked the discussion and know that the idea to using three steps is correct.

I just wrote an easy level algorithm called Leetcode 234: Palindrome linked list, through the practice, I wrote the code to reverse a linked list. So I plan to write the algorithm in the future.




No comments:

Post a Comment