Tag: tree
2 posts
-
Binary Trees and BSTs: Traversals, Recursion Depth, Validation and Serialization
Binary trees for interviews: why the BST property covers whole subtrees, skewed trees and RecursionError, iterative traversals, level order, and serialization.
-
The Composite Pattern in C++: Tree Ownership, Transparent vs Safe Designs and the LSP Problem
The Composite pattern in C++: treating leaves and containers uniformly, choosing raw pointers, unique_ptr or shared_ptr for ownership, file system and UI examples, and the transparent vs safe design trade-off.