However, this algorithm has exponential runtime complexity making it as inefficient as the naive approach of trying all permutations. The reason is that the algorithm does a lot of redundant work. For example, above we made a recursive call to find the best cost for computing both "ABC" and "AB". But finding the best cost for computing ABC also requires finding the best cost for "AB". As the recursion grows deeper, more and more of this type of unnecessary repetition occurs.