If you read one character at a time, you would see '^' , not find it in the map, and break. By checking 2 characters first, you correctly capture '^e' and decode it to 'e' .

: Choose 5 bits as your standard length to ensure you have enough unique combinations (32 total) for all 27 characters. Assign Values


83 8 Create Your Own Encoding — Codehs Answers

If you read one character at a time, you would see '^' , not find it in the map, and break. By checking 2 characters first, you correctly capture '^e' and decode it to 'e' .

: Choose 5 bits as your standard length to ensure you have enough unique combinations (32 total) for all 27 characters. Assign Values