Scramble String Memoization
Hard

Problem Statement

Optimize the scramble string recursive solution by memoizing results for pairs of strings.

Examples

1Example 1
Input:
{ "s1": "great", "s2": "rgeat" }
Output:
true
2Example 2
Input:
{ "s1": "abcde", "s2": "caebd" }
Output:
false
3Example 3
Input:
{ "s1": "a", "s2": "a" }
Output:
true
Loading...

Sign in to Run Code and Submit