c++ - How to use bucket sort to sort a set of strings -


i have set of strings set s = {string1, string2 ... upto n }. need sort them lexicographically.

how use bucket sort ?

also tell other efficient method can used solve question.

sort first character. gives number of "buckets." sort each nonempty bucket starting second character. repeat until whole thing sorted.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -