CSCI 2320 Data Structure Quiz1Name:___________________Question1: What is the output of the following code? (40 pts)(NOTE: There are 2 “cout<<” in the code, line 22 and line 28) -21111 1 172020 1 315 17Question2: Determine the Big O( ) notation for the following: (20 pts)1. 100n3 + 50n3 O(n3)2. 30n3( 2n5+ 200n) O(n8)3. (n2 + n2) (10n3 + 50n) O(n5)4. (0.1 n3 + 75 k2) m O(mn3 + m k2)5. (m + n)(10n3 + 50n) O(mn3+ n4)Question 3Draw the (1)stack and (2)linear queue (the original one), and (3)circular queue datastructures in array implementations for “each step” in the following sequence: add(A),add(B), remove, remove, add(D), add(E), remove, add(F), add(G). Assume an initialsize of 5 for the array implementation. Remember to show TOP (top of the stack) forstack and both Front and Back for queue. In circular queue implementation, assume wesacrifice one storage space for telling the difference between FULL and EMPTY (40 pts)STACK: Linear QUEUE:Circular
View Full Document