Problem 112: Implement `isBouncyNumber`