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
Answer and explanation
Concise answer
3A2B1C
Why this is correct
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.
Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.
Common mistake
No common mistake is linked to this question yet.
