We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Do you have any idea why i'm getting just half of the test cases?
def morganAndString(a, b):
# Write your code here
morgan_str=''
while len(a) > 0 and len(b) > 0:
if a <= b:
morgan_str+=a[0]
a= a[1:]
else:
morgan_str+=b[0]
b= b[1:]
if len(a) == 0:
morgan_str+=b
else:
morgan_str+=a
return morgan_str
Cookie support is required to access HackerRank
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 →
Do you have any idea why i'm getting just half of the test cases? def morganAndString(a, b):