Advertisement

Repeated Character

A character is accidentally typed twice in succession.

Learn

A character is accidentally typed twice in succession.

Repeated character errors occur when a typist accidentally presses a key twice, creating an unwanted duplicate character. This is common with fast typing or when a key is slightly sticky. The result is a string that is one character longer than intended.

Original character at position N is duplicated: ABC → ABBC

  • 12345 → 123345 (3 repeated)
  • HELLO → HELLLO (L repeated)
  • AB-1234 → AB-12234 (2 repeated)

How to recognize it

  • String is one character longer than original
  • Look for adjacent identical characters
  • One character appears twice in sequence

Common mistakes

  • Confusing with addition of different character
  • Missing the duplicate in longer strings
  • Not noticing legitimate double letters

Step-by-step walkthrough

Find the error: Original 'HELLO' vs Given 'HELLLO'

  1. Check lengths: original has 5 characters, given has 6
  2. Compare position 1: 'H' = 'H'
  3. Compare position 2: 'E' = 'E'
  4. Compare position 3: 'L' = 'L'
  5. Compare position 4: 'L' = 'L'
  6. Compare position 5: 'O' vs 'L' - extra 'L' found
  7. The letter 'L' was typed twice at position 4

Answer: Repeated character error: 'L' typed twice, creating 'LLL' instead of 'LL'

Practice guidance

Error Checking

Advertisement