RosettaCodeData/Task/Run-length-encoding/Mathematica/run-length-encoding-2.math

5 lines
137 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
mystring="WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW";
RunLengthEncode[mystring]
RunLengthDecode[%]
%==mystring