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?
6 Respuestas
+ 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
+ 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.
+ 8
How many characters are you trying to handle?
+ 1
I do converted other sorting in character, although pigeon hole sort and bucket sort are not working on character. can you do that?
0
just 10 elements only
0
Thank you for that! anyway can you make too of Partition Sort and N sort in character. thanks