Please check my code wjat is error?

Hello @kailash_01

The else condition in your staircase method is never going to run.
As for two integers x and y, there can only be 3 cases
x > y
x < y
x = y

What you need to do is make a bool “found” and initialize it with false and make it true when the element “f” is found.
and print 1 if found is true and 0 is found is still false.

Here is the modified code

Let me know if you still need any help.

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.