20%off off — LaunchSpecial
Exercises/#25 Reorder List
#25

Reorder List

Medium🔗 Linked Lists
90 XP

Problem

Given a linked list L0→L1→…→Ln, reorder it to L0→Ln→L1→Ln-1→L2→Ln-2→…

Examples

Input: 1→2→3→4
Output: 1→4→2→3

Input: 1→2→3→4→5
Output: 1→5→2→4→3
linked-listtwo-pointer
AI Assistant— powered by AI

Unlock hints progressively — start gentle, go deeper only if needed.

💡

Level 1: Gentle Nudge

A subtle direction

🗺️

Level 2: Approach

The algorithm to use

🔍

Level 3: Detailed

Step-by-step guidance

25 / 150

Your Solution

⚡ JavaScript

to save progress and use AI features