That's true. Nevertheless, I do remember that at somewhere I've read about the rigorous proof about this problem of which the result is bounded by O(m^n), where M is the size of the array and n is the same number as the n in n-th sum problem. Correct me if I'm wrong.