CS2x1 DSA Spring 2023 L2
CS2x1 DSA Spring 2023 L2
Koteswararao Kondepu
[email protected]
Recap
• Data type
• Data Structures
• Classifications of Data Structures
o Primitive data structures → basic data structures
o Non-Primitive data structures → complicated data structures
▪ Linear data structures
▪ Non-Linear data structures
• Abstract Data Structures
o Stack (LIFO)
▪ push/add/insert
▪ pop/remove/delete ▪ overflow
▪ top/peek ▪ underflow
Outline
• Exercises on Stack
• Implementation of Stack
• Applications of Stack
Exercise#1: Data Structure
Select the following correct options which define “Data Structure”!
• Recursion: (i) Any function which calls itself is called recursive. • Base case
(ii) Recursion terminates → we need to make sure • Sub task
• Recursive case
(iii) The small-small recursive functions should be convergence
(iv) The code is shorter
x+y-z+(s^t)*u/v
thank you!
email:
[email protected]