0% found this document useful (0 votes)
44 views2 pages

Assignment 1 Introduction To Stack

This document outlines an assignment on data structures focusing on stacks, with a submission date of August 27, 2025. It includes questions on postfix and prefix notation, recursive algorithms, stack operations, and various programming tasks related to stack implementation. Additionally, it provides important practice questions that do not need to be submitted.
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)
44 views2 pages

Assignment 1 Introduction To Stack

This document outlines an assignment on data structures focusing on stacks, with a submission date of August 27, 2025. It includes questions on postfix and prefix notation, recursive algorithms, stack operations, and various programming tasks related to stack implementation. Additionally, it provides important practice questions that do not need to be submitted.
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/ 2

ADIT

Data Structures
Assignment 1(Stack)

Submission Date: 27/08/2025


1 What is postfix notation? What are its advantages? Convert the following infix expression to
postfix. A + B - C * D / E $ F $ G
Evaluate it by considering following values and using stack.
A=20, B=15, C=10, D=8, E=4, F=2,
G=1
2 Enlist and briefly explain various applications of stack.
3 What is recursive algorithm?
Which data structure can be used to implement a recursive algorithm?
4 What is stack overflow and underflow? Write down its conditions.
5 What is prefix notation? What are its advantages? Convert the following infix expression to
prefix. A+B-C*D/E$F$G
Evaluate it by considering following values and using stack.
A=20, B=15, C=10, D=8, E=4, F=2, G=1

Important questions for your practice (no need to submit)


1 Write a program to implement multiple stacks.
2 Which property of stack that makes it useful for recursion? Explain briefly.
3 What is recursion? Recursive function evaluation is an explanation of which data structure?
4 Why parenthesis not required in prefix/postfix expression.
5 Translate the following string into polish notation(prefix expression) and trace the content of
stack A - ( B / C + (D % E * F) / G ) * H
Evaluate it by considering following values and using stack.
A=20, B=15, C=3, D=8, E=5, F=2, G=2, H=3
6 What is stack? Differentiate peep() and pop() operations. Write down algorithm for both.
7 Differentiate recursive and iterative function with an appropriate example.
8 Find infix equivalent of following prefix evaluation: * - + A B C D
9 Translate the following string into reverse polish notation(postfix expression) and trace the
content of stack A - ( B / C + (D % E * F) / G ) * H
Evaluate it by considering following values and using stack.
A=20, B=15, C=3, D=8, E=5, F=2, G=2, H=3
10 Differentiate stack and array.
11 What is stack? Explain push() and pop() operation on stack. Write down algorithm for both.
12 Write a program to do the parenthesis check using stack.
13 Write a program to reverse a list using stack.
14 Write a recursive program for factorial.
15 Write an iterative and recursive program for Fibonacci series using recursive function.
16 Find infix equivalent of following prefix evaluation: * - + A B C D
17 Find infix equivalent of following postfix evaluation: A B + C- D*
18 Write a program to convert infix expression into prefix expression using stack.
19 Write a program to evaluate prefix expression using stack.
20 Write a program for GCD of two numbers using recursive function.
21 Write a program for Tower of Hanoi using recursive function.
22 Write a program for exponent using recursive function.

You might also like