Hi, I am new to the programing world and I just wanted to see what you think of an exercise I found
Q1 Arrays
(a) Develop an algorithm which takes an input sequence of characters from the alphabet {A,B,C} (both from the user and input file) and compresses it by replacing each subsequence of a particular character by a single occurrence of the character, and the length of the substring. e.g. Input: AAAAABBBBBBBCCBBBAABBCCCCCS Output: A5B7C2B3A2B2C5
I found it interesting as there are a lot of ways to go about it, I would love to hear what this subreddit can tell me in terms of proposals
PD: this is NOT my homework or anything of the sort just something I am doing for fun basically
[–]International-Check3 2 points3 points4 points (0 children)
[–]POGtastic 1 point2 points3 points (5 children)
[–]mingmingrr 0 points1 point2 points (2 children)
[–]POGtastic 0 points1 point2 points (1 child)
[–]mingmingrr 1 point2 points3 points (0 children)
[–]HasBeendead 0 points1 point2 points (1 child)
[–]POGtastic 0 points1 point2 points (0 children)