PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Coinbase

Implement a Coin-Constrained Jump Strategy

Last updated: May 7, 2026

Quick Overview

This question evaluates a candidate's ability to design a stateful decision-making strategy combining physics-based motion reasoning, resource-constrained planning, and collision/constraint handling.

  • hard
  • Coinbase
  • Coding & Algorithms
  • Software Engineer

Implement a Coin-Constrained Jump Strategy

Company: Coinbase

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Take-home Project

You are implementing an autopilot strategy for a simple side-scrolling jump game. A character moves forward automatically. On each game tick, your strategy must decide whether the character should jump. Game rules: - If the character touches the ground, it loses. - If the character goes above the top boundary, it loses. - The map contains coins. When the character collides with a coin, the coin is collected and the score increases. - Every jump costs one coin. - If the strategy attempts to jump when the character has no coins left, the jump cannot happen; the character will continue falling and may lose. There are therefore three main failure modes: 1. Hitting the top boundary. 2. Hitting the ground. 3. Running out of coins when a jump is needed. Implement a strategy function that, given the current game state, returns whether the character should jump on this tick. The strategy should keep the character alive as long as possible while collecting coins and avoiding unnecessary jumps. Your implementation should reason about the current vertical position, vertical velocity, remaining coins, nearby collectible coins, and the risk of hitting the top or bottom boundary.

Quick Answer: This question evaluates a candidate's ability to design a stateful decision-making strategy combining physics-based motion reasoning, resource-constrained planning, and collision/constraint handling.

Related Interview Questions

  • Implement an In-Memory Database - Coinbase (hard)
  • Implement Game Physics and Block Mining - Coinbase (hard)
  • Compute Total Manual Distance - Coinbase (medium)
  • Implement a Flappy Bird Jump Agent - Coinbase
  • Implement Plus One - Coinbase (medium)
|Home/Coding & Algorithms/Coinbase

Implement a Coin-Constrained Jump Strategy

Coinbase logo
Coinbase
Apr 29, 2026, 12:00 AM
hardSoftware EngineerTake-home ProjectCoding & Algorithms
1
0
Practice Read
Loading...

You are implementing an autopilot strategy for a simple side-scrolling jump game.

A character moves forward automatically. On each game tick, your strategy must decide whether the character should jump.

Game rules:

  • If the character touches the ground, it loses.
  • If the character goes above the top boundary, it loses.
  • The map contains coins. When the character collides with a coin, the coin is collected and the score increases.
  • Every jump costs one coin.
  • If the strategy attempts to jump when the character has no coins left, the jump cannot happen; the character will continue falling and may lose.

There are therefore three main failure modes:

  1. Hitting the top boundary.
  2. Hitting the ground.
  3. Running out of coins when a jump is needed.

Implement a strategy function that, given the current game state, returns whether the character should jump on this tick. The strategy should keep the character alive as long as possible while collecting coins and avoiding unnecessary jumps.

Your implementation should reason about the current vertical position, vertical velocity, remaining coins, nearby collectible coins, and the risk of hitting the top or bottom boundary.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Coinbase•More Software Engineer•Coinbase Software Engineer•Coinbase Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.