B
bsabiston
Hi,
I've been trying to figure out why nth_element is going into an
infinite loop. Is it a requirement that all of the elements in the
list be different? Ie, can I call nth_element with a list like
{0,248,248,0,248,248} and expect it to not go into a loop? Debugging
it, it seems to just forever swap the first and last elements of that
array.
Thanks
B
I've been trying to figure out why nth_element is going into an
infinite loop. Is it a requirement that all of the elements in the
list be different? Ie, can I call nth_element with a list like
{0,248,248,0,248,248} and expect it to not go into a loop? Debugging
it, it seems to just forever swap the first and last elements of that
array.
Thanks
B