AKUNA CAPITAL interview question

C++ leetcode type problems on HackerRank