MCPcopy Create free account
hub / github.com/douchuan/algorithm / SameTree

Class SameTree

src/tree/binary/traverse.rs:112–112  ·  view source on GitHub ↗

Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value.

Source from the content-addressed store, hash-verified

110/// Two binary trees are considered equal if they are structurally identical and
111/// the nodes have the same value.
112pub struct SameTree;
113
114impl PreOrderVisitor {
115 /// # Safety

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected