Lomuto's semistable partition algorithm
Lomuto's semistable partition algorithm in action:
You can use this tool to analyze how algorithms work, it is 100% free to use.
http://componentsprogramming.com/algorithms/?repo=tao-js&snippet=partition_semistable
Do you know what stable means?
What about semistable?
Enjoy!