Skip to main content

Elective C: Algorithm and Programming

Introduction​

This module provides students with advanced knowledge in algorithm design, analysis, and implementation. Students will learn about various algorithms, data structures, complexity analysis, and programming techniques. This elective module builds upon the computational thinking foundation and prepares students for advanced computer science studies and competitive programming.

Learning Objectives​

Students will learn about:

  • Algorithm design and problem-solving strategies
  • Data structures and their applications
  • Algorithm analysis and complexity theory
  • Advanced programming techniques and patterns
  • Competitive programming and optimization
  • Real-world algorithm applications in software development

Module Structure​

This elective unit covers advanced programming and algorithm topics:

🧠 Algorithm Design​

  • Divide and conquer algorithms
  • Dynamic programming techniques
  • Greedy algorithms and optimization
  • Graph algorithms and traversal
  • String algorithms and pattern matching

πŸ“Š Data Structures​

  • Advanced tree structures (AVL, Red-Black trees)
  • Hash tables and hash functions
  • Heaps and priority queues
  • Graphs and network representations
  • Trie and suffix trees

⚑ Algorithm Analysis​

  • Time complexity analysis (Big O notation)
  • Space complexity considerations
  • Best, average, and worst-case scenarios
  • Algorithm comparison and selection
  • Performance optimization techniques

πŸ’» Advanced Programming​

  • Object-oriented design patterns
  • Functional programming concepts
  • Concurrent and parallel programming
  • Memory management and optimization
  • Code optimization and profiling

Key Concepts​

Algorithm Paradigms​

  • Divide and Conquer: Breaking problems into smaller subproblems
  • Dynamic Programming: Solving problems with overlapping subproblems
  • Greedy Algorithms: Making locally optimal choices
  • Backtracking: Exploring all possible solutions
  • Branch and Bound: Optimizing search algorithms

Data Structure Categories​

  • Linear Structures: Arrays, linked lists, stacks, queues
  • Tree Structures: Binary trees, heaps, balanced trees
  • Graph Structures: Adjacency lists, adjacency matrices
  • Hash Structures: Hash tables, hash maps, hash sets
  • Advanced Structures: Tries, segment trees, fenwick trees

Complexity Analysis​

  • Big O Notation: Asymptotic upper bounds
  • Big Omega (Ξ©): Asymptotic lower bounds
  • Big Theta (Θ): Tight bounds
  • Space Complexity: Memory usage analysis
  • Amortized Analysis: Average-case performance

Practical Skills​

By the end of this module, students will be able to:

  • Design efficient algorithms for complex problems
  • Implement advanced data structures and algorithms
  • Analyze algorithm performance and complexity
  • Apply programming patterns and design principles
  • Solve competitive programming problems effectively

Assessment Focus​

This module emphasizes:

  • Understanding of algorithm design principles
  • Application of data structures to solve problems
  • Analysis of algorithm efficiency and complexity
  • Creation of optimized solutions for real-world problems
  • Evaluation of different algorithmic approaches

Programming Languages and Tools​

Primary Languages​

  • Python: Rapid prototyping and algorithm implementation
  • C++: High-performance competitive programming
  • Java: Object-oriented algorithm development
  • JavaScript: Web-based algorithm visualization
  • Rust: Memory-safe systems programming

Development Tools​

  • IDEs: Visual Studio Code, IntelliJ IDEA, PyCharm
  • Version Control: Git and GitHub for code management
  • Testing: Unit testing and algorithm verification
  • Profiling: Performance analysis and optimization
  • Visualization: Algorithm animation tools

Algorithm Categories​

Sorting Algorithms​

  • Comparison Sorts: Quick sort, merge sort, heap sort
  • Non-Comparison Sorts: Counting sort, radix sort, bucket sort
  • Hybrid Sorts: Tim sort, intro sort
  • Stable Sorts: Merge sort, insertion sort
  • In-Place Sorts: Quick sort, heap sort

Search Algorithms​

  • Linear Search: Sequential search through data
  • Binary Search: Divide and conquer search
  • Hash-based Search: Constant-time lookup
  • Tree-based Search: Balanced tree traversal
  • Graph Search: BFS, DFS, A* pathfinding

Graph Algorithms​

  • Traversal: Depth-First Search (DFS), Breadth-First Search (BFS)
  • Shortest Path: Dijkstra's, Bellman-Ford, Floyd-Warshall
  • Minimum Spanning Tree: Kruskal's, Prim's algorithms
  • Topological Sort: Dependency resolution
  • Network Flow: Maximum flow, minimum cut

Getting Started​

To begin your journey through this module:

  1. Review the learning objectives to understand what you'll achieve
  2. Study algorithm design principles and problem-solving strategies
  3. Learn data structures and their implementation details
  4. Practice algorithm analysis and complexity evaluation
  5. Apply knowledge to competitive programming and real-world problems

This elective module provides advanced programming skills essential for computer science studies and software engineering careers. The knowledge gained here will be valuable for university studies and professional software development.


Source/Reference: ICT Curriculum and Assessment Guide - Education Bureau, Hong Kong