Pancake Sorting Leetcode

Problem : https://leetcode.com/problems/pancake-sorting/

My solution : https://ide.codingblocks.com/s/269968

Please tell why I ma getting wrong answer ?

hello @vaishnavtannu
where r u submitting/

I submitted in leetcode itself. Now, I realised that there can be multiple answers as well and that’s why I thought I am getting wrong answer according to sample output. Thanks !!

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.