Portfolio Path Counter
Optiver interview questions · Medium · OA round · 7 tests
Count every nonnegative +/-1 inventory walk of length at most m that ends exactly at the target balance.
The full question, tests and reference solution are available with a plan that includes Optiver.
Run your code with Ctrl+Enter to see results.