LING 111 Lecture 18: a8q3txt

53 views1 pages
8 Dec 2017
School
Department
Course
Professor

Document Summary

No1 mistake is that the for-loop should be for i in range(1,len(unsorted)) because the range is from second charactor to last one. No2 mistake is that g=quicksort(l) should be g=quick(g) mistake is that l=quicksort(g) should be g=quicksort(l)7. No3 mistake is that sortedlist. append() should be sortedlist. extend to make the result one list. Error: returned [[-2], [0], [-2]] on inputs [0, 2, -2, 4, 5] (-2<0<2<4<5) Error: returned [[], [2], []] on inputs [2, 1] (make the if satement outside for-loop to be false, Cause the for loop to run 1 time make the fist if statement inside the forloop to be true)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions