https://github.com/ayubamini/stringcompression
A simple program that compresses an alphabetical string
https://github.com/ayubamini/stringcompression
csharp dotnet string
Last synced: 8 months ago
JSON representation
A simple program that compresses an alphabetical string
- Host: GitHub
- URL: https://github.com/ayubamini/stringcompression
- Owner: ayubamini
- Created: 2021-08-18T00:31:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-18T00:40:32.000Z (over 4 years ago)
- Last Synced: 2023-09-09T19:32:56.758Z (over 2 years ago)
- Topics: csharp, dotnet, string
- Language: C#
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# StringCompression
A simple program in .NET 5.0 and unit testing that compresses an alphabetical string by collapsing consecutive characters. The rules
of the compression algorithm are defined by the test cases below.
# Test cases:
1. Input: aaabccccdd
Output : a3bc4d2
2. Input: yyyyyzzzzzzzzzz
Output: y5z10
3. Input: abcd
Output: abcd (note: not a1b1c1d1)
4. Input: hhhccchhhccc
Output: h3c3h3c3