FAQ Database Discussion Community

## how is the most significant bit radix sort more efficient than the least significant bit radix sort?

I was just reading the following question: Radix sort most significant first or least significant, which is faster? And the author of the accepted answer was suggesting that the MSD radix sort is indeed faster. I do not see why however. I have implemented both LSD and MSD (binary based...

## Sort function giving floating point exception for a large input of 0's

I have written a code for this problem: Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. Note: The result may be very large, so you need to return...

## How to sort a variable-length string array with radix sort?

I know that radix sort can sort same-length string arrays, but is it possible to do so with variable-length strings. If it is, what is the C-family code or pseudo-code to implement this? It might not a be fast algorithm for variable-length strings, but it is easy to implement radix...