Smallest Substring With Identical Characters II at Salesforce

Hard40.2% acceptance

This problem has 75.0% frequency at Salesforce.

Problem Description

You are given a binary string `s` of length `n` and an integer `numOps`. You are allowed to perform the following operation on `s` **at most** `numOps` times: * Select any index `i` (where `0 <= i < n`) and **flip** `s[i]`. If `s[i] == '1'`, change `s[i]` to `'0'` and vice versa. You need to...

Read full problem and hints

Topics


More Salesforce Questions

View all Salesforce questions