committing a solution to find-hackerrank problem