AKUNA CAPITAL interview question

Dynamic programming similar to LIS