@pjh said in Finding max element of an array using two heap-allocated arrays and a bubble sort:
@onyx said in Finding max element of an array using two heap-allocated arrays and a bubble sort:
Still the part that makes me cringe the most:
for(i = 0; i < n; i++)
m[i] = i;
Yes, yes, I know, memcpy is evil and all that, but holy fuck, if there was ever the time to use it...
How is memcpy going to achieve what the loop you've described does?
Asking for a friend...
What do you mean ho...
reads the code again
...oh
...
Now my headache is even worse.