C S 307 Midterm: Spring_M2
Document Summary
Points off 1 2 3 4 5 total off net score. Place you answers on the attached answer sheet. If the code contains a syntax error or other compile error, answer compile error . If the code would result in a runtime error / exception answer runtime error . If the code results in an infinite loop answer infinite loop . Recall that when asked for big o your answer should be the most restrictive correct big o function. For example selection sort has an average case big o of o(n2), but per the formal definition of big o it is correct to say selection sort also has a big o of o(n3) or o(n4). I want the most restrictive correct big o function. (closest without going under. ) public static int a(int x) { if(x <= 0) else return x * x + a(x - 1); return 0;