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:
Created | Aug 4, 2015 |
Published | Aug 4, 2015 |
Warriors Trained | 121827 |
Total Skips | 18969 |
Total Code Submissions | 349563 |
Total Times Completed | 57838 |
JavaScript Completions | 14868 |
Ruby Completions | 2164 |
Python Completions | 21072 |
C# Completions | 5383 |
Java Completions | 9193 |
CoffeeScript Completions | 28 |
Clojure Completions | 218 |
Haskell Completions | 702 |
R Completions | 100 |
C++ Completions | 3364 |
Crystal Completions | 23 |
C Completions | 1276 |
COBOL Completions | 7 |
Scala Completions | 105 |
NASM Completions | 10 |
TypeScript Completions | 389 |
Total Stars | 2663 |
% of votes with a positive feedback rating | 89% of 4894 |
Total "Very Satisfied" Votes | 3965 |
Total "Somewhat Satisfied" Votes | 744 |
Total "Not Satisfied" Votes | 185 |