Questions tagged as 'quicksort'

3
answers

Sort threaded list with method O (n * log (n))

I need to sort a linked list (own implementation, without using Java API) with a sort method that has complexity O (n * log (n)). Searching for methods that satisfy the condition found quicksort, however, it assumes random access to the elements...
asked by 02.02.2016 / 01:55
1
answer

quicksort interpretation

I've learned Haskell, and now I'm beginning to learn C. I've been trying to get my quicksort code in Haskell to C but I did not succeed. So I decided to look at some books and found the following code: /* Função de inicialização da Quicksort....
asked by 30.08.2014 / 03:16
2
answers

How to sort the items in a Listbox using quicksort

I'm doing a project for the university that consists of making software that sort from a listbox using quicksort, BlubbleSort etc ... In VB.NET I made an array to generate the random numbers in the listbox, but my difficulty now is to get the nu...
asked by 16.05.2016 / 03:52
1
answer

Stable vs. unstable ordering

What defines a stable sort algorithm? In this question I've been told a bit about stable and unstable ordering, but I still do not see the advantage of using an unstable one. In what cases can we use unstable ordering? Is it always prefe...
asked by 26.08.2018 / 23:01
1
answer

Stackoverflow in quick sort

I'm having a problem here in this code. These are functions for an array of objects using the quick sort algorithm, and I'm having the Stackoverflow error, and I can not identify the source. Someone help me to identify the source of the error?...
asked by 06.07.2017 / 01:40
1
answer

Quicksort vs Radix-sort

I'd like to know why Quicksort is more fuzzy than Radix-sort . Since the quicksort uses as a basis for the sort order and radix-sort the second can not be faster than O < in n ), and in fact it is mn where m is the number of bits use...
asked by 10.08.2018 / 14:37
0
answers

StackOverflowException for more than 50mil values [closed]

The code sorts a vector of up to 50,000 values from a txt and stored in an array by quicksort , but for 60,000 values or more, gives Overflow. I have already changed values to Int64 and it persists ... (obs: I change the size of t...
asked by 01.11.2014 / 16:15
1
answer

How to apply "goto" in quicksort? (c, c ++)

I'm doing a job for my college where I ask that a quicksort algorithm be done in C, using "goto" as much as I can. In the code below I applied "goto" to my knowledge, but I would like someone to help me apply "goto" to the rest of the algorit...
asked by 18.04.2017 / 04:16
1
answer

Sorting With certain condition

I asked the question Who will be disapproved? that had the rule Students would be sorted according to the number of problems solved, with draws sorted according to the alphabetical order of the names (there are no homonyms in the class), Well...
asked by 21.08.2018 / 02:56
2
answers

Quicksort in Java does not work

I'm trying to implement the quicksort method, but the code I wrote is not working, someone can help me (it sorts part of the sequence, but some elements are still cluttered). public static void quick(int v[], int start, int end) { if (end...
asked by 13.07.2016 / 16:31