@Test public void shouldReturnJustOneElementIfTheTreeContainsJustOneElementRecursive() { BinaryNode<Integer> root = new BinaryNode<Integer>(0); List<BinaryNode> result = binaryTreePostOrder.getRecursive(root); List<BinaryNode<Integer>> expected = Arrays.asList(root); assertEquals(expected, result); }
public List<BinaryNode> getRecursive(BinaryNode root) { validateTree(root); return getInner(root); }
BinaryTreePostOrder { public List<BinaryNode> getRecursive(BinaryNode root) { validateTree(root); return getInner(root); } }
BinaryTreePostOrder { public List<BinaryNode> getRecursive(BinaryNode root) { validateTree(root); return getInner(root); }  }
BinaryTreePostOrder { public List<BinaryNode> getRecursive(BinaryNode root) { validateTree(root); return getInner(root); }  List<BinaryNode> getRecursive(BinaryNode root); List<BinaryNode> getIterative(BinaryNode root); }
BinaryTreePostOrder { public List<BinaryNode> getRecursive(BinaryNode root) { validateTree(root); return getInner(root); }  List<BinaryNode> getRecursive(BinaryNode root); List<BinaryNode> getIterative(BinaryNode root);  }