Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
• A Set of Instructions
• Data Structures + Algorithms
• Data Structure = A Container stores Data
• Algoirthm = Logic + Control
Data Structures
• What is a data structure?
• “a scheme for organizing related pieces of information.“
-http://www.webopedia.com/TERM/D/data_structure.html
push(5);
push(10);
push(15);
The Push Operation
Program Output
Pushing 5
Pushing 10
Pushing 15
Pushing 20
Pushing 25
Popping...
25
20
15
10
5
About Program 18-1
Push(D)
Push(A)
Pop(D)
Push(T)
Push(U)
Push(M)
Empty( )
size( )
Using Queue in code blocks C++
Queue Task
Write a program to display the content of a queue in
reverse direction.
C++ LISTS
Motivation:Why Lists?
• The size of the arrays is fixed: So we must know the max no.
of elements in advance.
• Dynamic size
• Ease of insertion/deletion
Linked list (Types)
2 list
Front back