2) What item is at the front of the list after these statements are executed? DequelnterfacexString> waitingLine = new LinkedDeque<>(); waitingline.addToFront/"Jack"); waitingLine.addToFront("Rudy"); waitingLine.addToBack/"Larry"); waitingLine.addToBack/"Sam"; String name = waitingLine.getFront(); a) jack b) Rudy c) Larry d) Sam 6) a linked chain implementation of a queue, the performance of the enqueue operation is O(1) OO(log n) O(n) O(n^2) 7) In a linked chain implementation of a queue, the performance of the getFront operation is O(1) O(log~n) O(n) O(n^2) 8) In a circular array-based implementation of a queue, what is the performance when the enqueue operation must resize the array? O O(n^2) O(n) O(log n) O(1)
Need java help
2) What item is at the front of the list after these statements are executed?
DequelnterfacexString> waitingLine = new LinkedDeque<>();
waitingline.addToFront/"Jack");
waitingLine.addToFront("Rudy");
waitingLine.addToBack/"Larry");
waitingLine.addToBack/"Sam";
String name = waitingLine.getFront();
a) jack
b) Rudy
c) Larry
d) Sam
6) a linked chain implementation of a queue, the performance of the enqueue operation is
O(1)
OO(log n)
O(n)
O(n^2)
7) In a linked chain implementation of a queue, the performance of the getFront operation is
O(1)
O(log~n)
O(n)
O(n^2)
8) In a circular array-based implementation of a queue, what is the performance when the enqueue operation must resize the array?
O O(n^2)
O(n)
O(log n)
O(1)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps