How to merge two sorted integer array in place using O(n) time and O(1) space cost?

This is by no means a simple problem people are still writing research papers on the subject (PDF) . It is possible, but rarely done in practice because it's so much more complicated than a standard merge using scratch space.

Kronrod's merge was the first published algorithm to do that. It goes roughly like this.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions