Leetcode 1393. Capital Gain/Loss
Given a table of Buy/Sell transactions with day and price, compute each stock's total capital gain/loss by pairing each Buy with its corresponding subsequent Sell (ordered by operation_day) and summing (sell_price - buy_price) per stock.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.