Quicksort is a sorting algorithm invented by C. A. R. Hoare that has an average-case complexity of O(n log n), worst-case complexity of O(n^2). It is one of the fastest general-purpose sorting algorithms in practice.

learn more… | top users | synonyms

9
votes
1answer
135 views

QuickSort C# Implementation

It has been a while I haven't implemented a QuickSort and I wanted to write it down like I remembered. Here it is: ...
1
vote
1answer
79 views

Why is my Bubblesort implementation faster than my Quicksort code?

Here is my Bubblesort code: ...
5
votes
1answer
64 views

Quicksort implementation

I put together this implementation after playing around with various partitioning- and pivot-strategies, and it runs fine. I wrote this off a version which seemed a bit different from the majority of ...
5
votes
2answers
269 views

QuickSort of Comparable[]

Here is the code for the QuickSort class that I created. ...
7
votes
2answers
80 views

Is this quicksort efficient and acceptable?

In order to complete one of my assignment I needed to include a quicksort so I was wondering if this is correct and acceptable. The code: ...
1
vote
0answers
44 views

How does this specific quicksort work? [closed]

I am in school and we are learning sorting algorithms. After quite some struggle, I've managed to create this with the modest help of some googling skills. It has been quite some time and I now no ...
1
vote
1answer
113 views

Review my F# QuickSort Program

OK... last sort of the day and probably the most fun. F# is really awesome. ...
10
votes
2answers
178 views

Templated Quicksort

Original quicksort.h ...
3
votes
3answers
136 views

I feel as if my quicksort can be made more efficient, but what?

I just learned the quicksort algorithm and tried to implement it, but it feels dirty: ...
1
vote
1answer
227 views

Review of linked list and quick sort

I was trying another approach of sorting a linked list. Aside from the available methods, I've decided to take each node from the linked list and place it into an array. With that, I would be able to ...
3
votes
1answer
1k views

Implementation of quick sort in C#

I'm currently learning programming for the first time and I've created the following implementation of quick sort in C#. I basically read a very basic overview of how quick sort works recursively and ...
1
vote
4answers
141 views

QuickSort critique

This is my first attempt at Quick Sort and am looking for some helpful criticisms on how I can make my code better. Thank you ...
5
votes
2answers
400 views

In-Place Quicksort in Python

Code is below. I'd like to know if this is a solid/efficient implementation of the in-place quicksort algorithm and if my Python style is good (I know there are no comments for now). Code is also on ...
0
votes
2answers
1k views

Simplest Quick Sort using one 19 line function

This will later be be posted on my website to explain quick sort so I would like how I could improve the readability and simplicity of this demo class, I do not like my use of the stack (meaning this ...
4
votes
1answer
228 views

Help with comparison counters in quick sort algorithm

At the suggestion of @templatetypedef, I am posting the code for my quick sort to see if anyone can offer suggestions as to where to make comparisons. And any tips on improving the code. I am using ...
1
vote
2answers
338 views

Suggestions on improving Sorting Algorithm (Progress ABL/4GL)

I have written some sort routines for PROGRESS 4GL/ABL and wanting to get some input whether these sorts can be improved. And whether my sorts are true to name. And I would also be very interested in ...
0
votes
1answer
92 views

Does this QuickSort implementation still hold the O(N logN) complexity? [closed]

As noted from wiki, I know the average time complexity of the QuickSort algorithm is O(N logN). Does my implementation still holds ...
3
votes
1answer
581 views

Quicksort using pointers

As an exercise, I've written quicksort algorithm in C using pointers. Please comment and help me find the cases where it breaks (if any). ...
1
vote
2answers
429 views

Quicksort in Ruby!

I've been teaching myself Ruby this weekend. First of all, I am aware that there is a built-in sort function. I've written this code strictly as an exercise. I have background primarily in C# and ...
4
votes
3answers
4k views

My version of C++ quicksort

I built my code according to the algorithm provided in this YouTube video. http://www.youtube.com/watch?v=y_G9BkAm6B8 The file attached is my code, please review it and help me find the problem. It ...
6
votes
2answers
1k views
7
votes
1answer
1k views

Parallel Quicksort

As my parallel mergesort implementation was very memory dependant, I wanted to write a parallel quicksort one. The algorithm itself is working fine in serial mode, however when I go parallel things ...
7
votes
2answers
403 views

Quick Sort Implementation

I have written below code for Quick Sort in Java. ...
2
votes
2answers
381 views

Quicksort review

Reviewed quicksort today, here is the implementation I ended up with. Please post your feedback! ...
14
votes
2answers
647 views

Is this C++ quicksort program okay?

I wrote a quicksort program in C++. Is it okay to implement it this way? Am I using pointers correctly? Is my style okay? Any ideas to speed it up or save memory? ...
2
votes
1answer
461 views

More Generic Sorting Algorithm: Using Namespaces

I am currently reading The C++ Programming Language (Special Edition) and am learning about using templates. One of the exercises asks you to program a generic version of quick sort. I am hoping to ...
10
votes
5answers
41k views

Java Implementation of Quick Sort

This is my implementation of quick sort (algorithm taken from Cormen book). This is an in place implementation.Please let us know issues with this or any ideas to make it better. It performs at logN ...
2
votes
1answer
3k views

Handling duplicate keys in quicksort

A naïve quicksort will take O(n^2) time to sort an array containing no unique keys, because all keys will be partitioned either before or after the pivot value. There are ways to handle duplicate keys ...
0
votes
3answers
387 views

Almost Have My Own Quick Sort Algorithm: Need a Fresh Pair of Eyes

Here it is, I will make it more reader friendly after I get the algorithm completed. Does any thing with the quick sort algorithm stand out as for why it is not working 100%? This is not homework I am ...
2
votes
5answers
230 views

Please make some comment about this code of QuickSort.

Please make some comment about this code of QuickSort. My code is based on the example shown in this book. ...
5
votes
3answers
745 views

Quicksort application

What d'you think bout this code? ...
3
votes
3answers
1k views

Code Review of my Lisp Quicksort code

I would really appreciate it if someone could review my LISP code. I was attempting to write a quicksort implementation. Additionally, I generated my list dynamically and wrote a couple of tests. ...