LeetCode Hard – Scramble String
We can scramble a string s to get a string t using the following algorithm: Given two strings s1 and s2 of the same length, return true if s2 is a scrambled string of s1, otherwise, return false. Example 1:Input: s1 = “great”, s2 = “rgeat” Output: true Explanation: One possible scenario applied on s1 is: “great” –> “gr/eat” // divide at random index. “gr/eat” –>…