Project Euler #54: Poker hands

  • + 1 comment

    It is usually the case that Aces can be high or low card depending on whether that is useful for making a straight. In which case a hand with A 2 3 4 5 is considered a 5 high straight. This is fairly standard for poker rules. It was not mentioned in the problem statement, but using this option on the Ace is necessary to pass all of the test cases, specifically case 6.