Can anyone help me out?

You just need to print “Yes” or “No”.

but it is not accepting on leetcode

https://ide.codingblocks.com/s/332439 leetcode solution

This is because, you don’t return

"false"

but

false

Same with true.