title: Number of substrings in range [l, r] that can be permuted to palindrome
body: <p>Given a string <code>s</code> of lowercase English letters, with <code>|s| &lt;= 10^5</code>. There are upto <code>q &lt;= 10^5</code> queries giving a range <code>[l, r]</code> that asks: how many substrings of the string <code>s[l...r]</code> can be permuted to form a palindrome. </p>
  
  <p>Now a string can be permuted to a palindrome iff the number of characters appearing odd number of times is at most <code>1</code>. I tried to use a segment tree but can't seem to merge two ranges. How can I approach it?</p>