Introduction to Data Structures and Algorithms
What are Data Structures?
- An arrangement of data in a computer’s memory or sometimes on a disk
- Examples include arrays, linked lists, stacks, binary trees, and hash tables
- Allow efficient organization and manipulation of data
What are Algorithms?
- Step-by-step procedures to solve problems
- Manipulate data in structures in various ways (searching, sorting, etc.)
- Different from pseudocode - algorithms are abstract concepts, pseudocode is their representation
Properties of Data Structures
- Organization method
- Access patterns
- Memory usage
- Performance characteristics
Characteristics of Algorithms
- Input: Zero or more inputs
- Output: At least one output
- Definiteness: Clear and unambiguous steps
- Finiteness: Must terminate after finite steps
- Effectiveness: Each step must be basic and feasible
What Problems Can Be Solved?
- Real-world data storage: Databases, file systems
- Programmer’s tools: Stacks for function calls, queues for task scheduling
- Real-world modeling: Graphs for networks, trees for hierarchies
Module Learning Outcomes
- Describe concepts of data structures and algorithms
- Utilize them in programming problem-solving
- Create and implement various structures and algorithms
- Compare efficiency and choose appropriate solutions