Rajesh Kumar
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.

--

--

Rajesh Kumar
Rajesh Kumar

Written by Rajesh Kumar

Love to write about life, technology and things that matter.

No responses yet