Scrambled string

Write codeHard35 minGoogle style

Your task

A string can be 'scrambled' by recursively splitting it into two non-empty parts and optionally swapping them, applying this to either part. Given strings s1 and s2 of equal length (1 <= len <= 30, lowercase letters), return True if s2 is a scramble of s1.

Examples

is_scramble(s1: str, s2: str) -> bool
Example 1
Inputis_scramble("great", "rgeat")
OutputTrue