Data Structures & AlgorithmsModerateTCS NQT · Accenture

Problem: A word is "statistics". How many distinct letters appear at least twice in it?

  1. A. 4
  2. B. 2
  3. C. 3
  4. D. 5

Correct answer: C. 3

Letters s (3), t (3), a (1), i (2), c (1) — the letters with at least two occurrences are s, t and i, so the answer is three.

More Coding Interview Problems questions

Exams that ask this topic