You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: strings/scramble.js
+6
Original file line number
Diff line number
Diff 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.
1
7
// O(n) time - where n is the total of chars in str1
2
8
// O(1) space - because at maximum we will have 26 letters in our dictionary
0 commit comments