C S 314 Final: Spring_2015_final_GradingCrit_And_Solutions

25 views6 pages
31 Jan 2019
School
Course
Professor

Document Summary

Cs314 spring 2015 final solution and grading criteria. Aiobe - array index out of bounds exception may occur. Not certain code works, but, can"t prove otherwise. Gacky or gack - code very hard to understand even though it works. (solution is not elegant. ) Did not answer the question asked or showed fundamental misunderstanding. Violated restrictions or made incorrect assumption: answer as shown or -1 unless question allows partial credit. 2 6 4: (heap shown above and to the right, less time to complete because hashset add is o(1) while treeset add is o(logn). (if order not specified -1, 0 1 1 0 1 0 0 0, 120. Similar to method from linked list assignment, but this was with a singly linked list. Not handling case when list empty correctly. Not handling case when first must refer to different node (first node in range being removed) Suggested solution: public void removerange(int start, int stop) { if(start < stop) {