About this puzzle

The Trade — practice the decision, scored against the optimum

What does the The Trade puzzle teach?

Buy once, sell later, maximize profit — track the min-so-far. 'Buy the lowest, sell the highest' fails when the high comes before the low.

Why do interviews ask about this?

Best-time-to-buy-and-sell is the one-pass interview classic — track the min-so-far; the catch is you can't sell before you buy.

How is it scored?

The engine computes the provably-optimal answer for the exact instance you played (dynamic programming, shortest-path, or exhaustive search — never a heuristic) and scores your attempt as a percentage of it. No login needed to see your score.