seen
to 0 to act as a bit mask.c
in the sentence.
a. Calculate the index i
by subtracting the ASCII value of 'a' from the ASCII value of c
.
b. Create a bit mask mask
by left shifting 1 by i
positions.
c. Update seen
by performing a bitwise OR with mask
.seen
is equal to (1 << 26) - 1
, which represents all 26 bits set. If true, return true
; otherwise, return false
.