Given an array with n elements, how to find the number of elements greater than or equal to a given value (x) in the given range index i to index j in O(log n) complexity?
Count all n-digit numbers whose sum of digits equals to given sum? How can we solve this problem? How do we start to apply DP for problems like this?