Longest Palindromic Substring brute-force:
“Due to the three recursive calls, the time complexity of the above algorithm is exponential O(3^n)O(3
n
), where ‘n’ is the length of the input string. The space complexity is O(n)O(n) which is used to store the recursion stack.”
How is this 3^N? I think it should be N^2 or N^3. Please clarify in the explanation for time analysis for this problem