Algorithm · Ebay · Medium
You are given a string binaryString made up entirely of '0' and '1' characters, along with a list requests that specifies operations to perform on this string. Each element in requests follows one of two formats: "count: " — Counts how many '1' characters appear in binaryString from position 0 up to and including the given 0-based . "flip" — Inverts every character in binaryString in place: every '0' turns into '1', and every '1' turns into '0'. The requests are processed…
Checking your access…