Tap here to switch tabs
Problem
Submissions

Problem: Replace ?s to Avoid Consecutive Repeating Characters

Try to solve the Replace ?s to Avoid Consecutive Repeating Characters problem.

Statement

Given a string s containing lowercase English letters and the character '?', replace every occurrence of '?' with a lowercase English letter such that no two consecutive characters in the resulting string are equal.

You cannot modify characters other than '?'.

Return the final string. If there are multiple valid solutions, return any of them.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • s consists of lowercase English letters and '?'.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Replace ?s to Avoid Consecutive Repeating Characters

Try to solve the Replace ?s to Avoid Consecutive Repeating Characters problem.

Statement

Given a string s containing lowercase English letters and the character '?', replace every occurrence of '?' with a lowercase English letter such that no two consecutive characters in the resulting string are equal.

You cannot modify characters other than '?'.

Return the final string. If there are multiple valid solutions, return any of them.

Constraints:

  • 1≤1 \leq s.length ≤100\leq 100

  • s consists of lowercase English letters and '?'.