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 challengesPlate Tower Sort

Gamified challenge · Stacks

Plate Tower Sort

plates is a tower of plates listed bottom first: plates[0] is at the bottom and the last item is on top. Each number is a plate's width. You may lift only the top plate of a tower, you have one spare tower and one free hand, and you must never bury a plate you still need to move.

Write sortStack(plates) (Python: sort_stack(plates)) that returns the tidy tower, again bottom first: the widest plate at the bottom and the narrowest on top, so the list is in non-increasing order. Equal plates simply sit together.

For [3, 1, 4, 2] the answer is [4, 3, 2, 1]. Calling a library sort gets the same list, but the point is to do it with the spare tower: lift a plate, move narrower plates back off the spare, and set it down.

Sign in to play Plate Tower Sort

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