C S 314 Midterm: Spring_2013_M2

12 views17 pages
31 Jan 2019
School
Course
Professor

Document Summary

Points off 1 2 3 4 5 total off net score. Zihao: there are 5 questions on this test. 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). What is returned by the method call b("012345678901234")? return st. length() + b(st. substring(4)); What is output by the following code if list1 is an arraylist that contains the following values: [-2, 5, 2, -2, 1, 3] Iterator it1 = list1. iterator(); for(int i = 0; i < 2; i++) { Map map1 = new map(); map1. put("a", 2); System. out. print(map1. size()): what is output by the following code if list2 is an arraylist that contains. What is output by the following code? the following values: [2, 3, 2, 3, 4, 6] if(it2. next() % 2 == 0) N = data. length public list h(int[] data, int min) {

Get access

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

Related Documents