Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Implementing Suffix Array using bucket sort in java

$
0
0

Lets say we have List of suffixes for String banana - banana, anana, nana, ana, na, a. I was able to put each suffix in a bucket. like suffix that starts from 'a' will be in one bucket and suffix that starts with 'b' will be in other bucket. Same for n as well. But I was not able to sort strings lexicographically in a bucket efficiently. say bucket a should look like this - a, ana, anana. Because of this I am not able to solve this problem efficiently in java .I have been stuck for days now. Any piece of code/suggestions is much appreciated.


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>