Remove Adjacent Almost-Equal Characters at Salesforce

Medium53.1% acceptance

This problem has 75.0% frequency at Salesforce.

Problem Description

You are given a **0-indexed** string `word`. In one operation, you can pick any index `i` of `word` and change `word[i]` to any lowercase English letter. Return _the**minimum** number of operations needed to remove all adjacent **almost-equal** characters from_ `word`. Two characters `a` and `b`...

Read full problem and hints

Topics


More Salesforce Questions

View all Salesforce questions