DataStructure Stack
DataStructure Stack
Content
1. INTRODUCTION 2. STACK
Reverse a data
Type - C
Write a program that depending upon user's choice, either pushes or pops an
element in a stack.
A line of text is read from the input terminal into a stack. Write a program to output the
string in reverse order, each character appearing twice. (e.g., the string a b c d e should be
changed to ee dd cc bb aa)
Write a function in Python POP(Arr), where Arr is a stack implemented by a list of numbers.
The function returns the value deleted from the stack.
Write a program that depending upon user's choice, either pushes or pops an element in a
stack the elements are shifted towards right so that top always remains at 0th (zero) index.
Write a program that depending upon user's choice, either pushes or pops an element in a
stack the elements are shifted towards right so that top always remains at 0th (zero) index.
Write Each node of a STACK contains the following information :
(i) Pin code of a city,
(ii) Name of city
Write a program to implement following operations in above stack
(a) PUSH () To push a node in to the stack.
(b) POP( ) To remove a rode from the stack.
Write PUSH (Books) and POP (Books) methods, in python to add Books and remove
book considering them to act as Push and Pop operations of Stack.
JINI N K