5 kyu

Scramblies

9,193 of 57,838joh_pot

Description:

Complete the function scramble(str1, str2) that returns true if a portion of str1 characters can be rearranged to match str2, otherwise returns false.

Notes:

  • Only lower case letters will be used (a-z). No punctuation or digits will be included.
  • Performance needs to be considered.

Examples

scramble('rkqodlw', 'world') ==> True
scramble('cedewaraaossoqqyt', 'codewars') ==> True
scramble('katas', 'steak') ==> False
Strings
Performance
Algorithms

Similar Kata:

Stats:

CreatedAug 4, 2015
PublishedAug 4, 2015
Warriors Trained121827
Total Skips18969
Total Code Submissions349563
Total Times Completed57838
JavaScript Completions14868
Ruby Completions2164
Python Completions21072
C# Completions5383
Java Completions9193
CoffeeScript Completions28
Clojure Completions218
Haskell Completions702
R Completions100
C++ Completions3364
Crystal Completions23
C Completions1276
COBOL Completions7
Scala Completions105
NASM Completions10
TypeScript Completions389
Total Stars2663
% of votes with a positive feedback rating89% of 4894
Total "Very Satisfied" Votes3965
Total "Somewhat Satisfied" Votes744
Total "Not Satisfied" Votes185
Ad
Contributors
  • joh_pot Avatar
  • g964 Avatar
  • GiacomoSorbi Avatar
  • natan Avatar
  • anter69 Avatar
  • Blind4Basics Avatar
  • AlexPuts Avatar
  • Voile Avatar
  • mentalplex Avatar
  • FArekkusu Avatar
  • user9644768 Avatar
  • hobovsky Avatar
  • akar-0 Avatar
  • hasmith424 Avatar
  • farhanaditya Avatar
  • KayleighWasTaken Avatar
  • HartlIKS Avatar
Ad