public Leaf FindLeaf(string s, bool precisely) { BranchNode branch = FindBranch(s); if (branch == null) { return(null); } if (precisely) { return(branch.leaf); } var leaves = branch.FindAllLeaves(); if (leaves.Length == 1) { return(leaves[0]); } return(null); }