My solution is correct on Leetcode submission ut not here

Getting MLE error on test case 1, while submitting at hackerblocks while the function was working correctly on leetcode.

Leetcode submission link: “https://leetcode.com/submissions/detail/366669726/

Sorry it is TLE not MLE

Hey @yashkirat please share the code on ide.codingblocks.com as leetcode link not accessible to me.

https://ide.codingblocks.com/s/285922, the function is same as I submitted on the Leetcode.

This passes all tests https://ide.codingblocks.com/s/286006
just pass vector by reference for next() function.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.