Skip to content
Advertisement

Tag: lis

Longest Increasing Subsequence using recursion and cache

i’ve been trying to implement a cache in my recursive LIS function so it doesn’t calculate the same value twice. I would really aprecciate if someone can give me a hint of what im getting wrong. This is the recursive function that returns the LIS array that works fine: This is the same function but implementing a cache, it gives

Advertisement