Replace Nth Consonant

Problem Overview

  • Transform a text by replacing every nth consonant with the next consonant, preserving case and wrapping z→b (Z→B).
  • Input: a string and an integer n; Output: the updated string; constraints are unspecified.
  • Domain: string manipulation and text processing.
  • This coding interview problem was asked in Duolingo interviews.
  • Useful as an interview question focused on character handling and edge cases.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: