January 26, 2016

Difference between mechanism and algorithm

□ Algorithm : The purpose is to solve a problem

○ Step-by-Step Operation Procedure
○ Ex) Stack algorithm : The purpose is to solve problem of stack implementation
- Data insertion request is received →
- Use PUSH function →
- Explore uppermost address of the stack → (Follow-up action) → (Follow-up action)

□ Mechanism : The purpose is to understand something
○ Structure, form
○ Operation principle
○ Mechanism ⊃ Algorithm
○ Ex) Stack Mechanism : The purpose is to understand stack
- Stack is data structure of FILO
- Overflow of the stack is ~ / Underflow of the stack is ~
- Role of Push/Pop function is ~
- Algorithm of stack is ~