0% found this document useful (0 votes)
8 views4 pages

Assignment 2

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

Assignment 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

ID: Name:

INHA UNIVERSITY IN TASHKENT Assignment-2


School of Computers and Information Engineering
Fall semester 2024
Data Structures (SOC2010)
Submission Deadline: 20/10/ 2024 (16:45 Hr.) Sunday

NOTE:
1. You are required to take print out of this sheet and solve (handwritten) the questions on sheet
only. [Submissions not conforming to the given format will not be evaluated]
2. Copying of solution is strictly prohibited. In case it is found, then zero marks will be awarded.
3. Submit the scan copy of your solution on eclass. Late submissions are not accepted.
4. You are required to keep a hard copy of the assignment with you. This may be requested at a later
date for verification purposes.

Questions
1 . Consider the following stack, where STACK is allocated N=6 memory cells

STACK: AAA ,DDD,EEE,FFF,GGG…………

Describe the stack as the following operations take place:

1. PUSH(KKK)
2. POP()
3. PUSH(LLL)
4. PUSH(SSS)
5. POP()
6. PUSH(TTT)
Solution:
ID: Name:

2. Find the INFIX equivalents of the following POSTFIX expressions:

(a) A B + C * D –

Solution:

(b) ABC * + D –
Solution:
ID: Name:

3. Find the INFIX equivalents of the following PREFIX expressions:

(a) * – + A B C D
Solution:

(b) + – A * B C D
Solution:
ID: Name:

4. Write a function that accepts two stacks. Copy the contents of first stack in the second stack.
Note that the order of elements must be preserved.

Solution:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy