You are viewing a single comment's thread. Return to all comments →
Python solution:
def morganAndString(a, b): a += 'z' b += 'z' i = j = 0 res = "" while i < len(a) and j < len(b): if a[i:] < b[j:]: res += a[i] i += 1 else: res += b[j] j += 1 return res[:-1]
Seems like cookies are disabled on this browser, please enable them to open this website
Morgan and a String
You are viewing a single comment's thread. Return to all comments →
Python solution: