Smart Interview Basic Hackerrank Solutions Java