There’s an old story about the person who wished his computer were as easy to use as his telephone. That wish has come true, since I no longer know how to use my telephone. Bjarne Stroustrup

Run-length encoding

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


Data structure Description

Run-length encoding is a very simple form of data compression in which runs of data are stored as a single data value and count, rather than as the original run. Write a program to implement Run-length encoding for string


Output

   					 

Run Length Encoding Text: WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW
Encoded Text: 12W1B12W3B24W1B14W
Decoded Text: WBWBWBWBWBWBWB

				    

Comments


No comments available!

Please login to add comments.