private void validateInput(String input) {
    if (input == null) {
      throw new IllegalArgumentException("You can't pass a null String as input parameter.");
    }
  }
Tail recursive solution to this problem. This algorithm has the same complexity order in time
and space terms than the previous approach.
src/main/java/com/github/pedrovgs/problem51/ReverseString.java