Commit distinct subsequences and scramble string