Anonymous user
Run-length encoding: Difference between revisions
→Linq: Shortened code by 1 line and better linq too.
m (→Linq) |
(→Linq: Shortened code by 1 line and better linq too.) |
||
Line 699:
public static string Decode(string input) => input
.
.Select(p => new string(p.Last(), int.Parse(string.Concat(p.SkipLast(1)))))
.ToDelimitedString("");
|