Which way of defining function is better and why

i have made 2 functions of same name one in comments and other normally. Which is better and why?

commented function is correct because
2nd function will also insert -1 to the list

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.

both functions codes are correct. My question is which way is better and why? Or both ways are equally great.

NO, both didn’t do the same thing
below one will also insert -1 and the first one didn’t insert -1 in the list

if we talk with respect to time and space complexity both are equally ok