543
Page views
17
Files
0
Videos
4
R.Links

Icon
Assignments

Due Dates Is Over
Due Date:26-10-2022
Problem Solving in Stack and Queue
.Show to implement a queue using 2 stack (no code is needed, just a sketch and pseudo code) (11 points). What are the complexities of enqueue () (2 points) and dequeue () operations (2 points)? Note: A stack is a data structure with push (), pop (), and is Empty () operations; a queue is a data structure with enqueue (), dequeue () and is Empty () operations 2. Implement the method insert At (Item x, int n), which should insert an element at index n into the list. If the index is out of bounds, the exception Illegal Argument Exception should be thrown (8points). What is the complexity of this method? (2points)