Loading Company...
This is a verified interview question from Oracle. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Minimum Operations to Avoid Three Consecutive Characters" covers key patterns like Strings.
"You are given a string S consisting only of characters 'a' and 'b'. In one operation, you may change any character: 'a' → 'b' or 'b' → 'a'. Return the minimum number of operations required so that the string does not contain three identical consecutive characters."
Join thousands of developers practicing for Oracle.