To find the nth Catalan number in TypeScript, we can use either recursion or dynamic programming.
index.ts239 chars13 lines
index.ts274 chars16 lines
Both the above solutions have a time complexity of O(n^2) and a space complexity of O(n).
gistlibby LogSnag