private void validateInput(BinaryNode root, BinaryNode n1, BinaryNode n2) {
    if (root == null || n1 == null || n2 == null) {
      throw new IllegalArgumentException("You can't pass null elements as input.");
    }
  }
Iterative solution for this problem. The complexity order of this algorithm is the same in
memory terms, O(N), but is worst in space terms because we are using a list of BinaryNodes
that is going to suppose O(N) for space terms where N is the path to the element.

This algorithm is based on find the path of two nodes given a root node and compare both paths
to find the first non common element and return the previous node, the lowest common ancestor.
src/main/java/com/github/pedrovgs/problem21/LowestCommonAncestor.java