You need to sign in or sign up before continuing.×
7 kyu

Why So Serious?

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

Stats:

CreatedJul 18, 2017
PublishedJul 20, 2017
Warriors Trained441
Total Skips1
Total Code Submissions858
Total Times Completed255
JavaScript Completions255
Total Stars10
% of votes with a positive feedback rating81% of 83
Total "Very Satisfied" Votes58
Total "Somewhat Satisfied" Votes18
Total "Not Satisfied" Votes7
Total Rank Assessments9
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • user5304440 Avatar
  • smile67 Avatar
  • Blind4Basics Avatar
  • FArekkusu Avatar
Ad