Hexnode interview question

Find next greater sum dsa question