Matt Johnson

Matt Johnson

  • NA
  • 4
  • 5.3k

Recursive function overflow

Jun 7 2011 11:42 AM
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)