rootn0de
India
That thou art. Think.

That thou art. Think.

Currently Offline
Screenshot Showcase
Kingdom Come: Deliverance II
3 2
Recent Activity
0 hrs on record
last played on 22 Feb
0.1 hrs on record
last played on 22 Feb
0.2 hrs on record
last played on 22 Feb
Comments
2010 Dodge Charger 2 Nov, 2025 @ 10:51pm 
have some faith arthur
Sickening Consistency 2 Nov, 2025 @ 6:39am 
Funny teammate
rootn0de 24 May, 2025 @ 9:25pm 
int partition(std::vector<int>& arr, int low, int high) {
int pivot = arr[high];
int i = (low - 1);

for (int j = low; j <= high - 1; j++) {
if (arr[j] < pivot) {
i++;
std::swap(arr , arr[j]);
}
}
std::swap(arr , arr[high]);
return (i + 1);
}

void quickSort(std::vector<int>& arr, int low, int high) {
if (low < high) {
int pi = partition(arr, low, high);

quickSort(arr, low, pi - 1);
quickSort(arr, pi + 1, high);
}
}

int main() {
std::vector<int> data = {10, 7, 8, 9, 1, 5};
int n = data.size();
quickSort(data, 0, n - 1);
for (int i = 0; i < n; i++)
std::cout << data << " ";
std::cout << std::endl;
return 0;
}