Tag: trees
2 รายการ
Blog
leetcodepythontrees
LeetCode #104 Maximum Depth: Recursive DFS, stack หรือ BFS เลือกจากรูปทรงต้นไม้
เทียบสามวิธีหาความลึกสูงสุดของ binary tree พร้อม memory tradeoff, skewed tree และ unittest ที่รันจริง
leetcodealgorithmspython
LeetCode 102 Level Order Traversal: เลือก queue, index หรือ DFS
เทียบ BFS ด้วย deque, list พร้อม head index และ DFS สะสมตาม depth พร้อม trade-off ด้าน width recursion และ readability