Hi all! I'm doing some practice for a whiteboard style interview later this week. I'm going through and trying to get solid solutions to all the questions that have stumped me in the past. When I interviewed last time, I got a little stumped on the classic "longest common subsequence" problem. I have what I believe is an optimal - at least in terms of Big O - solution to the problem. However, I approached it a little different from some of the solutions I've seen online? Would someone out there mind double checking my work to verify its performance? I'm reasonably certain it works correctly, but I'm not 100% sure I'm memoizing the values properly.I want to explicitly state this isn't a homework question of any kind. I'm just doing this for my own learning/practice for interviews.
Here's a pastebin link: https://pastebin.com/y0GdK9EA
I can post it elsewhere if desired.