python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Implementing date sort (day, month, year) with quicksort in C++
I tried to sort the dates by implementing quicksort myself. However, the sample output is correct, but when I submit the correct answer, it says incorrect. I don't know where I'm going wrong, so I'm a...
Dustin
Votes: 0
Answers: 0
quick sorting an array of structs using pointers
My assignment is preforming quick sort on array of structs using pointers to the first and last elements of the array. This is the struct-
typedef struct Bus {
int number, distance, time; } Bus;
At s...

MadaBit
Votes: 0
Answers: 1
How to choose middle element of the array as the pivot in quicksort?
I have to implement quicksort in python. I have implemented the following code.
def quickSort(array, p, r):
if p < r:
q = partition(array, p, r)
quickSort(array, p, q- 1)
...
Kapil Gund
Votes: 0
Answers: 1
python: quicksort debugging
I am trying to implement quicksort, but I am unable to determine why I am seeing this error. I am recursively calling the sort fn which in turn calls partition fn.
ERROR:
[5, 2, 1, 6, 3, 89, 7869, 190...
vector8188
Votes: 0
Answers: 1