Dec 6, 2021
I agree with you, but I'm sharing the solution that I came up with at my interview. And like you said, swapping doesn't ensure the order. I think they included that term on their own. Because we know, this problem is similar to Quick Sort Partition Algorithm.