One-bit and Two-bit Characters

A binary sequence uses codes of length 1 (0) or length 2 (10 or 11). Given a sequence that ends with 0, determine whether the last character must be decoded as a single-bit code.

Examples
Input: [0]
Output: true
Hints

One-bit and Two-bit Characters

A binary sequence uses codes of length 1 (0) or length 2 (10 or 11). Given a sequence that ends with 0, determine whether the last character must be decoded as a single-bit code.