AKUNA CAPITAL interview question

I dont quite remember, but leetcode hard