Test cases are running perfectly but, still getting wrong answer?

do check my code at:

check for this input
((a+(b))+(c+d))

your code is giving not duplicate but they are duplicate

but in sample test cases it’s given that ((a+(b))+(c+d)) is not duplicate. ??

okay yeah I check that now

then you check for this input
1
(((a-b+c)+((a+d)+(d+e)))+((f+d)+(f+e)))
it is not duplicate but your code gives it is duplicate

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.