C S 314 Midterm: Spring_2015_E2
Document Summary
Points off 1 2 3 4 5 total off net score. Instructions: there are 5 questions on this test. Scores will be scaled to 200 points: you have 2 hours to complete the test, place you answers on this test. Place your answer on the line next to or under the question. 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. ) ____________________ return 2 + a(x + math. abs(x) / 2 + 1); public int a(int x) { if(x >= 2) else return 5; What is returned by the method call c(4) return 5 + c(x - 2) + c(x - 1);