Back to problems

Get Special Substring (MTS)

Algorithm · Salesforce · Medium

You are given a string s that consists only of lowercase English letters, an integer k, and a 26‑character binary string charValue. Each letter of the alphabet is assigned a type based on the corresponding digit in charValue: A digit of '1' means the letter is special. A digit of '0' means the letter is ordinary. For example, if the first character of charValue (index 0) is '0', then the letter 'a' is ordinary; if it is '1', then 'a' is special. The same mapping applies to…

Checking your access…