โ† Tiger Analytics questions

Best time to buy and sell stock, from O(n^2) to O(n)

Filed under Tiger Analytics

The question

Started with brute force in O(n^2); the interviewer asked for better, leading to an O(n) time, O(1) space solution.

No write-up yet. Related questions below have one.

Related Tiger Analytics questions

Collected from public candidate posts and coding forums. Updated Nov 2026.