companyhub
DashboardCompaniesProblemsSheetsBookmarksRevisionsAnalyticsLeaderboardCompare
Settings
Sign in
DashboardCompaniesProblemsSheetsBookmarks
Medium

Best Time to Buy and Sell Stock II

71.1% acceptance · asked by 28 companies

Solve on LeetCode
ArrayDynamic ProgrammingGreedy

Workspace

Scratch, run, iterate — then submit on LeetCode

Custom input (stdin)

Console

Output appears here. Runs on the free Piston sandbox.

Your notes

Sign in to keep markdown notes on this problem — approach, complexity, gotchas.

Who asks this

Toast100Careem100Ctc100Servicenow88Nike75Deutsche Bank75Sigmoid75Apple75Geico63Amazon63Ebay63Optiver63Goldman Sachs50Google50Agoda50Jpmorgan50Meta50Microsoft50Walmart Labs50Tiktok50Visa50Bloomberg50Zoho38Capital One38

Related problems

Two Sum
Easy
Merge Intervals
Medium
Best Time to Buy and Sell Stock
Easy
Group Anagrams
Medium
Number of Islands
Medium