{"id":"subtree-check-is-quadratic","text":"`isSubtree` has O(m * n) worst-case time because `_is_same` (which is O(n)) is called at up to m nodes during the DFS traversal of `root`","truth_value":"IN","source":"entries/2026/06/06/subtree-of-another-tree-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"subtree-check-is-quadratic","truth_value":"IN","reason":"premise"}]}}