Data Structures & AlgorithmsHardTCS NQT · Infosys

How many distinct strings can be obtained from aabb by removing exactly one character?

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

Correct answer: A. 2

Removing either a gives abb and removing either b gives aab, so only two distinct strings arise.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic