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 challengesMedal Quickselect

Gamified challenge · Quickselect

Medal Quickselect

scores holds every athlete's score. Ranked from best (largest) to worst, repeated scores each take their own place, so in [72, 95, 88, 61, 95, 80] both 95s take places 1 and 2.

Write kthLargest(scores, k) that returns the score in place k (1 ≤ k ≤ number of scores). For the example and k = 2 the answer is 95; for k = 3 it is 88.

There can be thousands of scores: a full sort works, but try quickselect, which partitions round a pivot and only keeps the side holding place k.

Sign in to play Medal Quickselect

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