Leetcode 87 Scramble String

Leetcode 87 Scramble String The problem description is as follow: Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.