Produce a high-quality educational video that explains the Heavy-Light Decomposition (HLD) algorithm — a fundamental data structure technique used to optimize queries and updates on trees, especially for competitive programming and advanced algorithmic applications. The video should be designed to effectively teach both intuition and implementation, making it accessible to students and professionals preparing for contests such as IOI, Codeforces, or ICPC. ⸻ ✅ Video Requirements 1. Introduction (Motivation) • Define the problem HLD solves: efficiently handling queries on paths or subtrees of a tree. • Show real-world or contest-related examples (e.g., finding sum/max on a path in a tree). • Brief mention of other techniques (like Segment Tree, Binary Lifting) and why HLD is more efficient for path queries. 2. Conceptual Explanation • Explain decomposition of a tree into “heavy” and “light” edges. • Describe how the tree is divided into chains (or paths). • Visualize the HLD process step-by-step using diagrams or animations: • Identify heavy child (the subtree with largest size). • Mark light edges and explain their significance. • Number nodes using Euler tour or DFS order. 3. Implementation Walkthrough • Pseudocode first, then real code (preferably in C++ or Python). • Show: • DFS to compute subtree sizes. • Assigning heavy paths. • Building a Segment Tree on top of linearized nodes. • Explain how to query from one node to another using HLD. 4. Complexity Analysis • Time complexity for preprocessing and per-query. • Comparison with naive approaches and other methods. 5. Examples & Practice • Walk through at least one sample problem from platforms like Codeforces or AtCoder. • Implement a query like: “find max value between node u and node v”. • Bonus: Add subtree queries support if possible. 6. Visual Aids • Use animations, tree diagrams, and call stack tracing to visualize DFS and segment tree traversal. • Highlight heavy/light edges, color chains differently. 7. Advanced Tips (Optional Section) • How to extend HLD to support: • Lazy propagation • Dynamic trees (e.g., using Euler Tour Trees) • Link-Cut Trees comparison ⸻ 🎯 Target Audience • Advanced Data Structures students • Competitive programmers (rated 1600–2400+) • Interview prep learners (Google, Meta, etc.) ⸻ 📋 Deliverables • YouTube-optimized video with chapters and timestamps • GitHub repo (or Gist) with code samples and explanations • Markdown README with: • Summary of HLD • Code used • Problem links • Complexity table

视频信息