• Create Account

### #ActualiMalc

Posted 24 April 2013 - 05:17 PM

One concern I have here is that either:
a) You have a buffer overrun on this line
while( Compare( m_Data[ q ], m_Data[ t ] ) < 0 )
because q starts off equal to Last, or
b) You are using a different range scheme from the standard library. The end() method of the standard C++ library returns an iterator that is one-past the end of the container.

You might want to take a look at how your Quicksort varies from some of the dozens of sorting algorithm on my site. I've got introsort on there too. Link below.
Median-of-three is one improvement often used too.

### #1iMalc

Posted 24 April 2013 - 05:17 PM

One concern I have here is that either:
You have a buffer overrun on this line:
while( Compare( m_Data[ q ], m_Data[ t ] ) < 0 )
because q starts off equal to Last, or
You are using a different range scheme from the standard library. The end() method of the standard C++ library returns an iterator that is one-past the end of the container.

You might want to take a look at how your Quicksort varies from some of the dozens of sorting algorithm on my site. I've got introsort on there too. Link below.
Median-of-three is one improvement often used too.

PARTNERS