Fold List on Itself
Reorder a linked list as if it were folded back on itself.
We'll cover the following
Statement
Given the head of a singly linked list, reorder the list as if it were folded on its back. For example, if the list is represented as:
→ → → … → → →
We’ll reorder it as follows:
→ → → → → → …
We may not modify the values in the list’s nodes. Only the links between nodes may be changed.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.