Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. F data type s I3 points): Based on the following descriptions of stack ADT (a

ID: 3909559 • Letter: 1

Question

1. F data type s I3 points): Based on the following descriptions of stack ADT (abstract ilf in the blanks p provide a proper terminology matching each operation. Descript Removes an element from the top of the stack Adds an element to the Write your answer here top of the stack Examines the element at the top of the stack. 2. 12 points] Based result on a stack-based operation storing operators and operands, what is the evauating the following stack expression 3 4 -23 s/ a) 12 b)-20 c)-8 d) 20 e)-12 3. [2 points] Which of the following methods add an element from a queue? a) element b) first cl offer d) dequeue e) enqueue . True or false? [6 points] There is particular order for the elements in a hash set. True False One use of a stack in computing is to reverse the order of something (such as an undo operation). When the size of an array is 10, the maximum number of comparisons (worst case) that can take place using linear search is 10 All recursive methods must have a base case. lolo! Elements in a queue structure are appended to the beginning of the queue and are removed from the end of the queue. ArrayList is known as a generic class with a generic type E. d aeremt

Explanation / Answer

Answer 1:
pop() is us ed to remove top element of stack

push() is used to push element to top of the stack

peek() returns the top element of stack

Answer 2:E

Answer 3: Enqueue is used to insert the elements into the Q

Answer 4:

a)false

b)true

c)true

d)true

e)true

f)true