Reputation: 4756
Recently i come across this problem and i couldn't find a solution for it, the problem is there is a array of numbers (N number) and we want to sort them, but we sort them in the way that shows in the picture:
First Sort from 1 to K+L
then Sort from K+1 to N
then Sort from 1 to K+L again.
that means from K+1 to K+L will sort twice.
The question is what is L should be to whole array be sorted?
Upvotes: 0
Views: 27