Question 5(1x12 - 12 marks) Consider your D as an array of 9 elements. Example ID: 201710340 शा 2 0 1 7 1 0 3 4 0 Consid
Posted: Fri May 20, 2022 10:36 am
Question 5(1x12 - 12 marks) Consider your D as an array of 9 elements. Example ID: 201710340 शा 2 0 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. Gengueue(acce]); Sacogueue (acc[1]); coqueue (acc[2]); a.Cogueue (acc[3]); 9 b. adegueue (): 1 audequeus(); 9 c. a.sgueue (ac.[4]); S.Sogueue (acc[5]); 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 ausbaueue (acc[6]); f. What is the performance (in Big-O notation) of each of the previous methods? Explain