Citadel interview question

DP + Graphs Stocks Problem