title: What is a boolean string? I was solving one question which said given a "BOOLEAN STRING", the DIVIDE(i, j) function returns a k
body: <p>I am not sure if I understood what is a &quot;Boolena string&quot;
  Heres the complete question:
  Given a Boolean string, the DIVIDE(i, j) function returns a k such that k = i−1, if all the values
  between i and j is TRUE, else the number of TRUE values between i and k is equal to the
  number of FALSE values between k + 1 to j. (a) Implement a linear time algorithm for the
  DIVIDE function. (b) UPDATE(i, b, k) returns an appropriate value of k, if the ith value is
  changed to b. Implement a constant time algorithm</p>