Growth score
Your task
A budgeting app stores one account-balance snapshot per month. The product team wants a 'growth score': the largest number of snapshots you can pick, keeping their original order but skipping any months you like, so that every picked balance is strictly higher than the one picked before it. Given the snapshots (at most 1000), return that count. An empty list returns 0. For example, [10, 9, 2, 5, 3, 7, 101, 18] gives 4 via 2, 5, 7, 101.
Examples
longest_growth_run(balances: list[int]) -> intExample 1
Input
longest_growth_run([10, 9, 2, 5, 3, 7, 101, 18])Output
4Example 2
Input
longest_growth_run([3, 3, 3])Output
1