You need to sign in or sign up before continuing.×
7 kyu
Why So Serious?
255user5304440
Description:
"Introduce a little anarchy. Upset the established order and everything becomes chaos…" – Joker
"The city needs you, Batman! The Kings and Queens are being held for ransom and our only lead is a package we just received from the Joker: half a pack of cards, a jumble of numbers and letters, and a smile emoji. We have an hour... can you find him?" – Gotham City PD
Task
Help Gotham City PD decode the puzzle below. If all the letters of the Joker's name are encoded in the string of cards, return true
. If not, return false
. Note the input is a string of shuffled cards i.e. "6s5s4cAs4s2c7s..."
and the name can be found in any order.
Card-letter correspondance
Card | Letter
------+--------
Jc | J
7s | O
5s | K
As | E
9c | R
Examples
"10s8s9c2s5s7c2c9s7sJc5cAs" => true
"9s4s8c6s4c10c8sJs3s" => false
Strings
Regular Expressions
Fundamentals
Similar Kata:
Stats:
Created | Jul 18, 2017 |
Published | Jul 20, 2017 |
Warriors Trained | 441 |
Total Skips | 1 |
Total Code Submissions | 858 |
Total Times Completed | 255 |
JavaScript Completions | 255 |
Total Stars | 10 |
% of votes with a positive feedback rating | 81% of 83 |
Total "Very Satisfied" Votes | 58 |
Total "Somewhat Satisfied" Votes | 18 |
Total "Not Satisfied" Votes | 7 |
Total Rank Assessments | 9 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |