UTF-8 Validation

Validate whether a given array of integers represents a valid UTF-8 encoding sequence. UTF-8 characters are 1 to 4 bytes long, with specific bit patterns for leading and continuation bytes. Determine if the entire byte sequence conforms to the UTF-8 specification.

Examples
Input: [197,130,1]
Output: true
Hints

UTF-8 Validation

Validate whether a given array of integers represents a valid UTF-8 encoding sequence. UTF-8 characters are 1 to 4 bytes long, with specific bit patterns for leading and continuation bytes. Determine if the entire byte sequence conforms to the UTF-8 specification.