• + 1 comment

    Both codes accomplish the same task. In the 1st one, the variable is declared inside the Checker class. In the 2nd one, the variable is declared outside of Checker(), and then instantiated inside Checker(). I prefer the 1st method.

    HackerRank solutions.