You are viewing a single comment's thread. Return to all comments →
Python recursion solution
def super_reduced_string(s): for i in range(len(s)-1): if len(s)==2 and s[i]==s[i+1]: return "Empty String" if s[i] == s[i+1]: s = s[:i] + s[i+2:] return super_reduced_string(s) return s
Seems like cookies are disabled on this browser, please enable them to open this website
Super Reduced String
You are viewing a single comment's thread. Return to all comments →
Python recursion solution