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 challengesRising Tower Stack

Gamified challenge · 1-D dynamic programming

Rising Tower Stack

Crates arrive on a conveyor in a fixed order; heights[i] is the height of crate i. You may keep any crates you like, but you can't reorder them, and every kept crate must be strictly taller than the one kept before it. Equal heights don't count as rising.

Write lis(heights) that returns the largest number of crates you can keep. An empty conveyor gives 0.

Example: for [10, 9, 2, 5, 3, 7, 101, 18] you can keep 2, 3, 7, 18 (or 2, 5, 7, 101), so the answer is 4.

Sign in to play Rising Tower Stack

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