I need it in 10 min ID NUMBER : 202010534
Posted: Fri May 20, 2022 10:41 am
I need it in 10 min
ID NUMBER : 202010534
Question 5 (1 x 12 = 12 marks) Consider your ID as an array of 9 elements. Example ID: 201710340 arr 2 o 1 7 1 0 3 4 0 Consider a Linear Queue implemented using an array of length 6. Show the contents of the queue after executing each of the following segments of code in order. a. lengueue (acc[0]); suengueue (acc[1]); Sengueue (acc[2]); scengueue (acc[3]); 9 b. adegueus(); adegueue(); 9 c. Sengueue (acc[4]); acengueue (acc[5]); 9 d. What is the output of the following statements? System.out.println(a.size()); System.out.println(a first(); e. Explain what will happen after executing the following statement. auengueue (acc[6]); q f. What is the performance (in Big-O notation) of each of the previous methods? Explain.
ID NUMBER : 202010534
Question 5 (1 x 12 = 12 marks) Consider your ID as an array of 9 elements. Example ID: 201710340 arr 2 o 1 7 1 0 3 4 0 Consider a Linear Queue implemented using an array of length 6. Show the contents of the queue after executing each of the following segments of code in order. a. lengueue (acc[0]); suengueue (acc[1]); Sengueue (acc[2]); scengueue (acc[3]); 9 b. adegueus(); adegueue(); 9 c. Sengueue (acc[4]); acengueue (acc[5]); 9 d. What is the output of the following statements? System.out.println(a.size()); System.out.println(a first(); e. Explain what will happen after executing the following statement. auengueue (acc[6]); q f. What is the performance (in Big-O notation) of each of the previous methods? Explain.