[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 835
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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