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 challengesCommon Gene Finder

Gamified challenge · 2-D dynamic programming

Common Gene Finder

A subsequence keeps some bases of a strand in their original order, possibly with gaps: GTA is a subsequence of GATTACA. A common gene is a subsequence of both strands.

Write lcs(a, b) that returns the length of the longest common gene of strands a and b. For GATTACA and TACGATA the answer is 4 (for example GATA).

Strands use the letters A, C, G, T, are at most 16 bases long, and may be empty (the answer is then 0).

Sign in to play Common Gene Finder

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