Ad
  • Custom User Avatar

    Well, this one is more inspiring. For the kata, the algorithm complexity of solution can not be reduced. However this trick is somehow better than doing int comparison (as I once did), let alone adding up two numbers each time. On the other hand, utilizing the set type also involves consideration of the feature of python language, which is good.

  • Custom User Avatar

    Yep. Not much effort on implementation is needed when plan is in mind, which is good.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Considering the third case first may help.