Passes small input case, but not large input case.