Need the code of problem

can i get code for this video

i can provide you the code
but code is not helpful if you try it on your own it will be more beneficial

for Reference Purpose use this code

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like :heart:: and don’t forgot to mark doubt as resolved :grinning:

in the problem it is stated if cobras and cobra is given the output for cobra should be -1

yes you can also do this
you just have to add one more condition

i have done this and also update the code
you can check it on the previous code as well

1 Like

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.