• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 852
  • Last Modified:

deque quicksort

Hey,
         Im having trouble with quicksort for deques.  Can somebody please help me with it?  Im lost.  I dont know how to start it.
0
mpmcroy
Asked:
mpmcroy
1 Solution
 
tinchosCommented:
Hi mpmcroy

try to explain what you need to do a little more, and tell me how you plan to do it.......... then I'll be able to help you a little more
0
 
burcarpatCommented:
what wrong with using std::sort ( which is not quicksort in the latest stl implementations but regardless )

-- ba
0
 
PhilipNicolettiCommented:
also note : if by "quicksort" you mean the C library qsort() routine, you
can not use it. qsort() expects the "container" to be in contiguous memory.
So while you can use qsort() on a vector (passing &v[0]), you can not use
it on deque.

burcarpat gave the solution : use std::sort()
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now