Quick sort not working


it is showing error list index out of range
please help