Good code is its own best documentation. As you're about to add a comment, ask yourself, 'How can I improve the code so that this comment isn't needed?' Improve the code and then document it to make it even clearer. Steve McConnell

Burrows Wheeler transform

Language Java | Level Intermediate | Category Data structure | September 9, 2015 10:09 am


Data structure Description

Burrows–Wheeler transform helps rearranges a character string into runs of similar characters and useful for string comparison.

Write a program to implement Burrows–Wheeler transform.


Output

   					 

12 rotations

Hello world.
ello world.H
llo world.He
lo world.Hel
o world.Hell
 world.Hello
world.Hello 
orld.Hello w
rld.Hello wo
ld.Hello wor
d.Hello worl
.Hello world

 world.Hello
.Hello world
Hello world.
d.Hello worl
ello world.H
ld.Hello wor
llo world.He
lo world.Hel
o world.Hell
orld.Hello w
rld.Hello wo
world.Hello 

od.lHrellwo 

1o1d1.1l1H1r1e2l1w1o1 
Compressed length: 22

				    

Comments


No comments available!

Please login to add comments.