Same code as mam but showing wrong

I have done the same code as mam but it is giving me error. Can u pls check what is wrong

HEy @code_breaker-1001 You are getting error bcoz in the line number 29 you have written arr[pivot] but it should be either arr[mid] or pivot only bcoz you have already taken out pivot value and pivot variable is storing pivot value and not index.I have changed the code.
Look for the changes in comments

ohhh Thank u so much…

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.