Buy and sell a stock as many times as you like, holding at most one share, and maximise profit. LeetCode 122, asked in a Fortinet backend coding round.
Buy and sell a stock as many times as you like, holding at most one share, and maximise profit. LeetCode 122, asked in a Fortinet backend coding round.
Opens with the full question.