Given a sequence of binary numbers (0, 1) of size n in which every 0 represent a
Fantastic news! We've Found the answer you've been seeking!
Question:
Given a sequence of binary numbers (0, 1) of size n in which every 0 represent a decrement to the sum and every 1 represents the increment to the sum. You have to find the minimum possible value of k such that the sum of the first k elements is greater than the sum of remaining elements. The initial sum for both the half is 0. Eg.
- given sequence 101011 The minimum possible value of k 6
- given sequence 1001001 The minimum possible value of k 0
Posted Date: