Reverse Shuffle Merge

  • + 4 comments

    Was one of the toughest challenges in terms of amount of time it took to get all the boundary conditions correct.

    I went through the Editorial after I solved the problem, although the approach itself is somewhat OK to understand by reading the editorial, I'm sorry to say that the code given is hardly readable. Especially using single letter variable names for arrays, and even more - using the same variable names for an array declared in the beginning of the code and re-using the same variable for the loop iterator as well, just adds more confusion when looking at the code. I believe it could be improved to make it easier to understand for a reader who did not solve the problem on his/her own.

    Here is my submission if someone wants to look at an easier to read code using a similar approach mentioned in the editorial.