Skip to content

Commit a5b72c0

Browse files
committed
add description for scramblies
1 parent b1cfca6 commit a5b72c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

strings/scramble.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
// Complete the function scramble(str1, str2) that returns true if a portion of str1 characters can be rearranged to match str2, otherwise returns false.
2+
3+
// Notes:
4+
5+
// Only lower case letters will be used (a-z). No punctuation or digits will be included.
6+
// Performance needs to be considered.
17
// O(n) time - where n is the total of chars in str1
28
// O(1) space - because at maximum we will have 26 letters in our dictionary
39
function scramble(str1, str2) {

0 commit comments

Comments
 (0)