Starting from:

$25

CSE220 - Assignment- 06 -  Applying Stack & Queue Data Structure [CO 4] - Solved

Task 1: Stack Implementation [Task 1.1 to task 1.12 are java code] 
Task 1.1 

Write java code to build a stack with array.

Task 1.2 

Implement a method which will show the size of the stack

Task 1.3 

Implement a method which will show whether the array is empty or not

Task 1.4 

Implement push operation on stack

Task 1.5 

Implement pop operation on stack

Task 1.6 

Implement peek operation on stack.

Task 1.7 

Implement toString and search operation on stack.

Task 1.8 

Implement stack by linkedlist.

Task 1.9 to task 1.14 

Repeat task 1.2 to 1.7 with linkedlist.

                                                                                                         1

Task 2: Queue Implementation [Task 2.1 to task 2.12 are java code] 
Task 2.1 

Write a java code to build a queue using circular array.

Task 2.2 

Implement a method which will show the size of the queue

Task 2.3 

Implement a method which will show whether the array is empty or not

Task 2.4 

Implement enqueue operation on queue

Task 2.5 

Implement dequeue operation on queue

Task 2.6 

Implement peek operation on queue.

Task 2.7 

Implement toString and search operation on queue.

Task 2.8 

Implement queue by linkedlist.

Task 2.9 to task 2.14 

Repeat task 2.2 to 2.7 with linkedlist.

 

 

Task 3: Queue Simulation 
Draw the queue structure in each case when the following operations are performed on an empty queue. Show every step.

1.       Add A,B,C,D,E,F

2.       Delete X letters. [X=Last 4 digit of your ID%3]

3.       Add G,H

4.       Delete Y letters. [Y=Last 4 digit of your ID%4]  

                                                                                                         2

More products