143. Reorder List

# Medium

circle-check

Key idea: find middle + reverse latter part + merge

length of list is even
length of list is odd
triangle-exclamation

Python example: 注意快慢指针的终止条件,慢指针指向的位置,要把两个list分开

T = O(N/2 + N/2) = O(N), S = O(1)

Last updated