Only one test case passing....need help

hello @aman89533
r u getting tle on other cases or wa.

Getting WA for 3/4 testcases…only one test case is passing.

@aman89533

ur code was correct

a) u need to print unused space but u were printing used space

b) for invalid cases u need to print -1.

check ur updated code here->

Thank you very much…i really appreciate
Can u please take a look at this code too…getting WA

Palindromic Queries

please create a separate thread from that question using ask doubt.

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.