Ad
  • Default User Avatar

    It may use powerful built-in features, but subsequences(s) runs in O(2^N) time, where N is the length of s. This makes this solution prohibitively slow for long strings (MUCH slower than a dynamic programming solution, which will have O(N^2) time complexity).