plz help me in this ambiguous permutation?

iKQhaz - Online C++ Compiler & Debugging Tool - why i m getting wrong ans

1 Like

you can check my solution here solution… for any query feel free to ask !!

@s29011996 if you can tell me my mistake it will be more beneficial for me

understanding ur code is difficult for me… u can just check the logic and improve ur implementation

thanks @s29011996

Could you please explain your logic? Have you tried few testcases?

my logics is i asked for entering the array which is required to check and then i created my array with given n if both the array are same then it is ambiguous @rahul_nexus