Questions tagged [radix-sort]

Radix sort is a sorting algorithm which sorts key/value pairs with integer keys by ordering digits.

307 questions
-1
votes
2 answers

Avoid segmentation fault in C++ Radix Sort?

Using code taken from somewhere on the interwebs, I've attempted to implement a radix sort function into my program. The input for the program is a text file containing roughly 1.2 million long ints. I already have an array of maxSize = 1200000 that…
-2
votes
1 answer

How should I dynamically allocate string pointers in C++?

Hello, everyone! I'm trying to dynamically allocate space for a string pointer in C++, but I'm having much trouble. The code I've written is, partially, this (it's about RadixSort-MSD): class Radix { private: int R = 256; static…
-2
votes
1 answer

Delphi Radix Sort supporting negative integers

Lately I used the great sorting algorythm made by Rebuilder from Habr.com. It served me well, but it sorts only positive integers, and recently I run into the need to sort negatives as well. For now I use QuickSort, but since the array is very large…
Alexander
  • 306
  • 10
-2
votes
2 answers

Can initialization of queue change values?

Here I have a List which i hope to successfully 'Radix Sort' it.... But I got a problem with my value in the list.. It originally contained 5 4 1 2 3 10 9 8 8 2 but when I make my queue at the position below, it suddenly changes list[6] to 81,…
skullmind
  • 37
  • 4
-2
votes
1 answer

Radix Sorting Algorithm in c

I have been tried to write radix sort in c.when i run my code with the static array it works well. but when i am trying to take random inputs from file it gives me an "Segmentation fault" at run time.help Please just help to modify this code here is…
-4
votes
1 answer

LSD radix sort c++ code

I wrote this code to implement lsd radix sort algorithm for strings. Logic: We start from the least significant digit and first apply sorting to this digit. Then, we move to the next digit to the left and so on. count[] contains frequency of each…
AvinashK
  • 3,106
  • 5
  • 38
  • 85
-5
votes
1 answer

Radix Sort in Python

I could use some help. How would you write a program in python that implements a radix sort? Here is some info: A radix sort for base 10 integers is a based on sorting punch cards, but it turns out the sort is very ecient. The sort utilizes a…
1 2 3
20
21