How does Radix Sort work?

前端 未结 4 1459
感动是毒
感动是毒 2021-01-30 08:48

I don\'t know why this is so hard for me to wrap my head around. I\'ve looked through the wiki pages, and pseudo code (as well as actual code) trying to understand how radix so

4条回答
  •  旧时难觅i
    2021-01-30 09:26

    Think of a deck of cards. You first sort it by suit in four piles. Then you put those four piles on top of one another and now sort into 13 piles based on rank. Put those together and you now have a sorted deck.

提交回复
热议问题