1
Answer

Recursive function overflow

Ask a question
Matt Johnson

Matt Johnson

13y
1.5k
1
Hey, I built a working recursive function that finds the Longest Common Sequence between two strings. http://en.wikipedia.org/wiki/Longest_common_subsequence_problem

It works perfectly fine and it is fast cause I use a memiozation table so that I'm not calling something that I've previously called already. My problem lies that when I have strings over 150 characters, I get a call stack overflow. I was wondering if anyone knows of a good suggestion to fixing this or of a better way of finding the longest common subsequence.


Answers (1)