Ebay | OA | SDE | booleanDeque: Efficient Binary String Operations
Question · Posted Apr 2026
Problem Statement You are given an integer n, representing the length of a binary string a, which is initialized with all '0's. You are also given operations, an array of strings, where each string represents one of two types of operations: "L": Find the smallest index i such that a[i]=′0′, and set a[i]=′1′. If no such index exists (all characters are '1'), do nothing. "C[ind]": Set a[ind]=′0′. This operation sets the character at the specified 0-based index to '0' regardless ...
The full answer & interview discussion are available to premium members.
Log in Create a free account