Update the new character ' s ▁ occurrence ▁ ▁ This ▁ step ▁ can ▁ also ▁ be ▁ skipped ▁ ▁ as ▁ we ' ll never encounter this character in the string because it has been added just now
occurrences [ index ] = 1 ;