Maximum Profit from Repeated Stock Trades
Asked at Zip · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026
You are given the price of a stock on each day, in order. You start with no shares, and each day you may buy one share, sell the share you hold, or do nothing. Find the largest total profit you can make over the whole period.
Loading the problem…
More Zip interview questions
- Implement a Vending Machine with Bill Insertion and Change-Making (OOD)
- Implement an LRU Cache
- Implement Functions with AST and Find Tree Roots
- Reaching Far Along Buildings with Bricks and Ladders
- Maximum Sub Sentence Using Prefix Tree
- Poker Hand Combinations Generator