GamifiedGamified challengesPracticeRaceLeaderboardPricing

Learn data structures by watching them move, then doing it yourself. Press M anytime to toggle sound.

A product of Amypo Technologies, Coimbatore.

Learn

  • All topics
  • Learning path
  • How it works
  • About dotprep

Practice

  • Practice arena
  • Daily challenge
  • Gamified challenges
  • Race mode
  • Leaderboard

Interview prep

  • Java interview
  • Coding questions
  • Company questions
  • System design
  • Jobs & careers

You

  • Dashboard
  • Settings
  • Pricing
  • Create account

© 2026 dotprep

Content last updated 20 November 2026

GamifiedGamified challengesPracticeRaceLeaderboardPricing
Log inStart free
Gamified challengesParade Merger

Gamified challenge · Linked lists

Parade Merger

Each parade is a singly linked list of floats (ListNodes with a number val), sorted from smallest to largest; equal numbers may appear. You get the head floats a and b (either may be null).

Write merge(a, b) that returns the head of one parade containing every float from both, still sorted. Reuse the floats you were given by relinking next; don't create new ones.

For 1 → 2 → 4 and 1 → 3 → 4 return 1 → 1 → 2 → 3 → 4 → 4. If one parade is empty, the answer is the other one.

Sign in to play Parade Merger

This game is part of the paid plans. Sign in, then pick a plan to write your answer, watch it play out, and step through the algorithm with its guide.

Sign in with Google

or log in with email · create an account