Some test cases are failing

I did not get the question correctly that what i have to return for which condition


this is my code for the asked function please suggest some alteration what should i do and please give comments if you give a code
thanks:)

Hi… refer to my code https://ide.codingblocks.com/s/612708 I have explained using comments…

Hi @Coderdeep
I hope ur doubt is cleared now???

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.