Most voted "quicksort" questions
23 questions
Sort by count of
-
7
votes3
answers1081
viewsSort chained list with O(n*log(n) method)
I need to sort a chained list (own implementation, without using Java API) with a sorting method that has O(n*log(n) complexity. Researching methods that satisfy the condition found the quicksort,…
-
6
votes1
answer347
viewsinterpretation of quicksort
I learned Haskell, and now I’m starting to learn C. I’ve been trying to pass my quicksort code in Haskell to C but I haven’t succeeded. So I decided to look at some books and found the following…
-
4
votes2
answers87
viewsHow to draw items from a Listbox using quicksort
I am carrying out a project for the University that consists in carrying out a software that makes the 'Sort' of a listbox using quicksort , Blubblesort etc... In VB.NET I made an array to generate…
-
3
votes1
answer295
viewsStackoverflow in Quick Sort
I’m having a problem here at this meeting. These are functions for an array of objects using the Quick Sort algorithm, and I’m getting the Stackoverflow error, and I can’t identify the source.…
-
2
votes0
answers62
viewsStackoverflowexception for more than 50,000 values
The code sorts an array of up to 50,000 values from a txt and stored in a array for quicksort, but for 60,000 values or more, it’s Overflow. I’ve changed values to Int64 and persist... (Obs: I…
-
2
votes1
answer183
viewsQuicksort vs Radix-Sort
I’d like to know why Quicksort is more diffuse than Radix-Sort. Since the quicksort uses the comparison and Radix-Sort not the second can be faster than the(nlog(n)), and actually it’s O(Mn) where m…
-
2
votes2
answers257
viewsQuicksort 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 remain cluttered). public static void…
-
2
votes1
answer807
viewsStable vs unstable sorting
What defines a stable sort algorithm? In this question has already been talked a little about what is stable and unstable ordering, but I still do not understand the advantage of using an unstable.…
-
1
votes1
answer29
viewsVector sorting of character vectors with qsort <cstdlib>
The following program is not ordering the chars vector correctly, but I don’t know why. Maybe it’s my auxiliary function "cmpstr" that isn’t returning the right value in some cases, or my qsort…
-
1
votes1
answer100
viewsHow to apply "goto" to quicksort? (c, c++)
I’m doing a job for my college where I ask for a quicksort algorithm to be done in C, using "goto" as much as I can. In the code below I applied the "goto" as far as my knowledge allows, but I would…
-
1
votes1
answer42
viewsOrdering With a certain condition
I made the point Who’s Going to Fail? that had the rule Students would be ordered according to the number of problems solved, with draws solved according to the alphabetical order of the names…
-
0
votes0
answers888
viewsWhat is the best way to show the External Quicksort simulation
I have to make one External quickSort simulator, showing for example the step by step of the same. Showing modifications to variables lower bound, upper bound, the main vector, the area vector(would…
-
0
votes1
answer630
viewsVector sorting of character vectors with qsort <stdlib. h>
The following program is not ordering the chars vector correctly, but I don’t know why. Maybe it’s my auxiliary function "cmpstr" that isn’t returning the right value in some cases, or my qsort…
-
0
votes2
answers112
viewsWhat’s wrong with my Quicksort code in C?
Here is my code: #include <stdio.h> #include <stdlib.h> int lista[1000]; int tamanho; main () { printf("Tamanho: "); scanf("%d", & tamanho); int c; for (c = 0; c < tamanho; c++) {…
-
0
votes1
answer110
views"Segmentation Fault" in a function that performs Quicksort
I am doing a job that asks to create a quicksort function to alphabetically sort a txt file, but it is showing the error: Segmentation fault In the main function I call the function so:…
-
0
votes0
answers298
viewsUnderstanding the Quick Sort algorithm graphically
I have this code below working correctly. #include <stdio.h> #include <stdlib.h> #include <string.h> void quicksort (int *vetor, int inicio, int fim) { int i, j, meio, aux; i =…
-
0
votes1
answer54
viewsQuicksort C - Contest. c:16:50: error: request for Member' name in Something not a Structure or Union
I’m trying to make this URI thing: Tetris His high school class decided to organize a tetris championship. After discussion about the rules, it was defined that each student would play a total of 12…
-
0
votes0
answers78
viewsHow to make quicksort "manual"
I’ve already made one Selectionsort manual in Pyhon see below: lista = [] # digite 0 para encerrar a entrada de dados while True: x = input('Entrada: ') if x == '0': break else: lista.append(x) nota…
-
0
votes1
answer133
viewsHow do I show the randomized quicksort step by step?
How do I show the sort process step by step? Either by showing the state of the vector at each change or by showing a tree. I have tried to print each of the three functions and also tried to create…
-
0
votes1
answer470
viewsQuicksort in double chained list
For a college task, I need to adapt the quicksort algorithm to a "time" object, which contains dozens of attributes such as stadium, name, nickname, date of foundation, etcs. Within main, a list of…
-
0
votes1
answer128
viewsRelate two vectors/arrays of different types and sort them in C++
I have a file . txt from where I need to collect the data (will be placed below). The first column refers to the part code and the second refers to the piece name. I need to find a way to sort the…
-
-1
votes1
answer253
viewsDifficulties with quickSort algorithm in C
I need to do a college work involving quicksort, but I’m finding difficulties in the code: #include <stdio.h> #include <stdlib.h> #define RA 8 int quickSort(int *vec[], int left, int…
-
-1
votes1
answer29
viewsQuick Sort array implementation error
When presenting the elements of the vector, there are strange numbers that do not correspond to those entered by the user. I would like to identify where the error is. #include <iostream>…