You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#if one of the word is empty, so we concatenate the left char
merge+=word1[p1:]+word2[p2:]
return merge
# why not word1[p1] or word2[p2]? this is to determine which char I have to choose when the char we are comparing are equal(if word1[p1]==word2[p2]) depending on the chars on the left e.g. if w1=adaa and w2= acaaaaa, I have to choose the a's of w1 since the left value of w1>w2 (daa> caaaaa or d>c).