A simple example would be a version of the Quicksort. Quicksort is used to quickly sort things (mostly numbers). For this, each element is compared to a central element (called "pivot"). Depending on how this element is selected the sorting can take more time or less.