private DecisionNode getMaxChild(DecisionNode tree) { DecisionNode max = null; int maxCount = 0; foreach (var child in tree.Branches) { var list = subsets[child]; if (list.Count > maxCount) { max = child; maxCount = list.Count; } } return max; }