Daily challenge for 2025-03-04
63. Reorder List
Write a function solve that reorders a singly linked list such that the last element becomes the second element, the second to last element becomes the 4th element, etc.. ie: L0→L1→...→Ln-1→Ln becomes L0→Ln→L1→Ln-1→Ln2→Ln-2→... it may be useful to look at the relevant leetcode
Example:Input: [1,2,3,4,5]Output: [1,5,2,4,3]
Run this challenge interactively in Python or JavaScript when the app loads.