Reported October 2026
Jane Streetsimulation

Two-Tower Strategy Game

Reported by candidates from Jane Street's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Jane Street OA. Under 2s to a working solution.
Founder's read

The Jane Street OA reported in October 2026 hands you a two-player tower game with a tiny input and a long rulebook. dayLimit tops out at 8, so brute force isn't just allowed, it's the intended move. The real fight is modeling the state correctly: dollies, bricks on dollies, tower heights, and the lock day after MOVE_FAR. If you blank on the rules, StealthCoder is the safety net that reads the problem on screen and gives you a working search while the proctor sees nothing.

The problem

West and East each start with a near tower of height 5, a far tower of height 0, no dollies, and no bricks on dollies. Each unlocked turn uses one action:
BUY: acquire one permanent dolly.
LOAD: add one brick to every dolly.
MOVE_NEAR: move every dolly brick to the near tower and empty the dollies.
MOVE_FAR: commit every dolly brick to the far tower and empty the dollies. The team is locked on the following day; those bricks arrive at the start of that locked turn.
OBSERVE: consume the turn without changing state.
West acts first each day. East follows the supplied deterministic action schedule; an action listed on a locked East day is ignored. West wins after either turn when its near tower is taller than East's far tower and its far tower is taller than East's near tower.
Return a minimum-day winning West schedule of calendar-day actions within dayLimit, including WAIT on a forced locked day. Break equal-length ties lexicographically using BUY < LOAD < MOVE_FAR < MOVE_NEAR < OBSERVE < WAIT. Return an empty array when no win is possible.

Function
findWinningTowerStrategy(eastActions: String[], dayLimit: int) → String[]

Examples
Example 1
eastActions = ["OBSERVE","OBSERVE","OBSERVE","OBSERVE","OBSERVE","OBSERVE","OBSERVE"]
dayLimit = 7
return = ["BUY","BUY","BUY","LOAD","LOAD","MOVE_FAR","WAIT"]
West loads six bricks onto three dollies, commits them on day 5, and receives them on the forced wait day, making the far tower taller than East's near tower.
Example 2
eastActions = ["BUY","LOAD","MOVE_NEAR","BUY"]
dayLimit = 4
return = []
Four days are insufficient for West to build a far tower above East's near tower.

Constraints
1 <= dayLimit <= 8.
eastActions.length == dayLimit.
Every East action is one of BUY, LOAD, MOVE_FAR, MOVE_NEAR, or OBSERVE.

Reported by candidates. Source: FastPrep

Pattern and pitfall

The trick is that dayLimit <= 8 with five West actions gives at most 5^8 sequences, about 390k. That's small. Run a BFS or DFS over West's action choices, simulating both players each day, and keep the first winning schedule by length. Since you want minimum days with lexicographic ties, explore actions in the order BUY, LOAD, MOVE_FAR, MOVE_NEAR, OBSERVE and stop at the first win at the shortest depth. The pitfalls are all in the simulation. A MOVE_FAR locks the team the next day, bricks land at the start of that locked turn, and that day becomes WAIT in West's schedule. East's listed action on its own locked day is ignored. Check the win condition after each turn, not just at day end. If the simulation feels fiddly live, StealthCoder is the hedge that can lay out the state transitions for you.

The honest play: practice the pattern, and have StealthCoder ready for the one you didn't see coming.

If this hits your live OA

You can drill Two-Tower Strategy Game cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Jane Street's OA.

Jane Street reuses patterns across OAs. Built for the candidate who saw this exact problem leak two days before his OA and wondered if anyone had a play. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Two-Tower Strategy Game FAQ

How hard is the Two-Tower Strategy Game really?+

The algorithm is easy, the bookkeeping is hard. With dayLimit at most 8, exhaustive search works. Most failures come from misreading the lock rule, brick arrival timing, or the win check happening after both turns each day.

What's the trick to solving it?+

Treat it as a bounded search over West's actions. Simulate East deterministically from the given schedule, track dollies, loaded bricks, near and far heights, and lock status. Return the shortest winning schedule, or an empty array if none exists.

How do I handle the locked day?+

After West plays MOVE_FAR, the next day is forced. West's action there is WAIT, and the committed bricks land at the start of that locked turn. Apply the arrival before checking the win condition. East's locked days work the same way, with its listed action ignored.

How do I break ties between equal-length schedules?+

Order is BUY, LOAD, MOVE_FAR, MOVE_NEAR, OBSERVE, WAIT. Search depth by depth and expand actions in that order, so the first win found at the minimum depth is lexicographically smallest. WAIT only appears when forced.

How do I prepare in 48 hours?+

Practice writing a clean state-simulation function and a DFS with pruning on small bounds. Write out example 1 by hand to confirm the lock and arrival timing. Don't memorize solutions, since the rulebook is what differs between variants.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Jane Street.

OA at Jane Street?
Invisible during screen share
Get it