AKUNA CAPITAL interview question

BFS search in application and maximum subsequence.