Exam-style question
Try this first
A sequence contains the values A, A, A, B, B, C. Which is a suitable run length encoding representation?.
- A.3A2B1C
- B.A3B2C1
- C.3A3B
- D.AABBC1
Model answer
What a good answer should say
- 3A2B1C
Explanation
Why this works
Run length encoding represents consecutive repeated values by storing the number of repetitions and the value. Three As, followed by two Bs and one C, can therefore be represented as 3A2B1C.
Common mistake
No common mistake is linked to this question yet.
