void sorting(int* arr, int size, bool order = false)
{
if (!order)
{
for (int i = 0; i < size; i++)
{
for (int j = 1; j < size; j++) {
if (arr[i] < arr[j])
if(arr[i] != arr[j])
arr[i] = arr[j];
}
}
}
so why does this spam the biggest number instead of acc organizing them
i think the algorithm should work fine. what am i missing ?
it should organize it descending