0% found this document useful (0 votes)
15 views1 page

Data Structures Assignment in Java

The document outlines an assignment for the Data Structure course at Ibadat International University, due on November 26, 2024, with a total of 30 marks. It includes tasks such as implementing a Stack using a Linked List and a Queue using an Array in Java, converting an infix expression to postfix, and manipulating a binary tree. Strict instructions against late submissions and copying are provided, with penalties for violations.

Uploaded by

Maaz Fareed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Data Structures Assignment in Java

The document outlines an assignment for the Data Structure course at Ibadat International University, due on November 26, 2024, with a total of 30 marks. It includes tasks such as implementing a Stack using a Linked List and a Queue using an Array in Java, converting an infix expression to postfix, and manipulating a binary tree. Strict instructions against late submissions and copying are provided, with penalties for violations.

Uploaded by

Maaz Fareed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Ibadat International university Pakpattan campus

Department of Computer Science

Subject: Data Structure Due Date: 26-11-24

Subject Teacher: Dr. Lal Khan Total marks: 30

Assignment #1
Instructions:
1. The assignment after due date will not be accepted.
2. Copying of assignment from any source, internet, ChatGPT or from your fellows is not
allowed, in case of copying student will be graded with Zero marks.

Q#1: You are required to implement a Stack using a Linked List and a Queue using an Array in Java.
Additionally, you must insert at least 10 elements into each data structure. For example, you can insert
10 book names into the stack and 10 person names into the queue.

Once the elements are inserted, you should perform 10 push operations to add elements onto the
stack. Afterward, remove half of the elements from both the stack (using the pop operation) and the
queue (using the dequeue operation).

Finally, you must display the contents of the stack and queue both after the insertion and after the
removal operations to check the status of the data structures. [10]

Q#2: Convert this infix expression to post fix using stack (2-3+4)*(5+6*7) [10]

Q#3: Insert the following elements in the binary tree.


50, 70, 35, 20, 40, 60, 80, 25 and then delete 70, after deletion of the element 70 what will be the
shape of remaining binary tree. Then re draw the tree after deleting the element 35 [10]

You might also like