5 kyu
Sorting Poker
146 of 384myjinxin2015
Description:
When no more interesting kata can be resolved, I just choose to create the new kata, to solve their own, to enjoy the process --myjinxin2015 said
Description:
John learns to play poker with his uncle. His uncle told him: Poker to be in accordance with the order of "2 3 4 5 6 7 8 9 10 J Q K A". The same suit should be put together. But his uncle did not tell him the order of the four suits.
Give you John's cards and Uncle's cards(two string john
and uncle
). Please reference to the order of Uncle's cards, sorting John's cards.
Examples
john = '♦6♥2♠3♦5♠J♣Q♠K♣7♦2♣5♥5♥10♠A'
uncle = '♠2♠3♠5♥J♥Q♥K♣8♣9♣10♦4♦5♦6♦7'
return '♠3♠J♠K♠A♥2♥5♥10♣5♣7♣Q♦2♦5♦6'
john = '♦6♥2♠3♦5♠J♣Q♠K♣7♦2♣5♥5♥10♠A'
uncle = '♣8♣9♣10♦4♦5♦6♦7♠2♠3♠5♥J♥Q♥K'
return '♣5♣7♣Q♦2♦5♦6♠3♠J♠K♠A♥2♥5♥10'
Puzzles
Algorithms
Sorting
Similar Kata:
Stats:
Created | Oct 25, 2016 |
Published | Oct 25, 2016 |
Warriors Trained | 1042 |
Total Skips | 61 |
Total Code Submissions | 1743 |
Total Times Completed | 384 |
JavaScript Completions | 146 |
C# Completions | 52 |
F# Completions | 19 |
Python Completions | 187 |
Total Stars | 21 |
% of votes with a positive feedback rating | 92% of 116 |
Total "Very Satisfied" Votes | 100 |
Total "Somewhat Satisfied" Votes | 14 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 5 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 6 kyu |