Urban Company | OA | 2022 | Coding questions and answers
urbancompany · Question · Posted Apr 2026
Given a binary string consisting of 0s and 1s only and an integer K We have to make the value of the string K by a minimum number of operations. Steps to calculate the value of the string:- Cut the string into the minimum number of disjoint substrings such that every substring has the same character ('0' or '1').The substring value is the number of characters present in it. The value of the string is the xor of all the ...
The full answer & interview discussion are available to premium members.
Log in Create a free account