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 challengesAnagram Radar

Gamified challenge · Fixed sliding window

Anagram Radar

text and word are made of lowercase letters a-z. A position i is a hit if the len(word) letters starting at i are a rearrangement of word: the same letters, each the same number of times, in any order.

Write findAnagrams(text, word) that returns every hit position, in any order. For text = "cbaebabacd" and word = "abc" the answer is [0, 6] (cba and bac). If the word is longer than the text, return an empty list.

Sorting every window works but is slow; keep 26 letter counts for the window and update them as it slides.

Sign in to play Anagram Radar

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