Problem 376. Poker Series 05: isStraight
Solution Stats
Problem Comments
-
1 Comment
in test suite #4... NOTE: I'm calling rows top to bottom, (HIGH) ♠ - ♥ - ♦ - ♣ (LOW)
you have the choice between two straights:
#1) A♥ 2♠ 3♠ 4♦ 5♣
#2) 2♠ 3♠ 4♦ 5♣ 6♥
I was under the impression that A high always takes precedence
and since the A is tied with the 6, suite wise, I can't figure out why this second option would be the desirable solution
Is it because in this situation, Ace is low? Because if so, this hasn't been consistent throughout the Poker Series and now I'm just surprisedPikachu.jpg
Problem Recent Solvers59
Suggested Problems
-
Number of 1s in the Binary Representation of a Number
389 Solvers
-
Flag largest magnitude swings as they occur
637 Solvers
-
Return a list sorted by number of consecutive occurrences
245 Solvers
-
156 Solvers
-
Golomb's self-describing sequence (based on Euler 341)
131 Solvers
More from this Author51
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!