We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
A hand such as A♣ K♣ Q♦ J♠ 10♠ is an ace-high straight (also known as "broadway" or "royal straight"), and ranks above a king-high straight such as K♥ Q♠ J♥ 10♥ 9♣. The ace may also be played as a low card (having a value of "1") in a five-high straight such as 5♠ 4♦ 3♦ 2♠ A♥, which is colloquially known as a "wheel". The ace may not "wrap around", or play both high and low; 3♠ 2♦ A♥ K♠ Q♣ is not a straight.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Project Euler #54: Poker hands
You are viewing a single comment's thread. Return to all comments →
Yes, and see the following.
A hand such as A♣ K♣ Q♦ J♠ 10♠ is an ace-high straight (also known as "broadway" or "royal straight"), and ranks above a king-high straight such as K♥ Q♠ J♥ 10♥ 9♣. The ace may also be played as a low card (having a value of "1") in a five-high straight such as 5♠ 4♦ 3♦ 2♠ A♥, which is colloquially known as a "wheel". The ace may not "wrap around", or play both high and low; 3♠ 2♦ A♥ K♠ Q♣ is not a straight.