Accenture Aon CoCubes OA 2026 | Maximize Binary Operations & Reduced Array Product

Accenture · Question · Posted Jun 2026

Problem 1 - Maximize Binary Operations (Bitwise Score) Problem Statement You are given a binary string S consisting only of characters '0' and '1'. You are allowed to perform exactly one operation: Select any two adjacent characters. Swap their positions. Your objective is to maximize the final value of the binary string when interpreted as a binary number. Since the resulting decimal value may be extremely large, return the answer modulo 109 + 7. Constraints Constraint 2 ≤ |S| ≤ ...

The full answer & interview discussion are available to premium members.

Log in Create a free account