The cardinality of uppercase letters is only 26 so we can use a fixed size array to count the frequency of each character efficiently.