What is easy to codes in sorting ascending like pigeonhole_sort,bucket_sort using character not integer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is easy to codes in sorting ascending like pigeonhole_sort,bucket_sort using character not integer

I don't see any codes on online given character, all of them are integer why is that?

13th Apr 2017, 12:42 PM
Nabel U. Abdulmalik
Nabel U. Abdulmalik - avatar
6 Answers
+ 9
Okay, so I did testing and found that I couldn't use neither pigeon hole sort, nor bucket sort to sort characters. However, I was able to use a relative concept called a counting sort that is almost exactly a pigeon sort but it doesn't take things in, in groups. here is the code with explanations: https://code.sololearn.com/ctDxpVS2Wy0Z/?ref=app
14th Apr 2017, 3:47 PM
SoraKatadzuma
SoraKatadzuma - avatar
+ 8
Because integers are a good example. You can easily change it to a character sorter if you need. However if you really have troubles with it, please give an example of what you want to achieve with it.
14th Apr 2017, 3:07 AM
SoraKatadzuma
SoraKatadzuma - avatar
+ 8
How many characters are you trying to handle?
14th Apr 2017, 12:52 PM
SoraKatadzuma
SoraKatadzuma - avatar
+ 1
I do converted other sorting in character, although pigeon hole sort and bucket sort are not working on character. can you do that?
14th Apr 2017, 12:11 PM
Nabel U. Abdulmalik
Nabel U. Abdulmalik - avatar
0
just 10 elements only
14th Apr 2017, 12:58 PM
Nabel U. Abdulmalik
Nabel U. Abdulmalik - avatar
0
Thank you for that! anyway can you make too of Partition Sort and N sort in character. thanks
16th Apr 2017, 6:35 PM
Nabel U. Abdulmalik
Nabel U. Abdulmalik - avatar