Error:MethodError: no method matching getindex(::typeof(LCSlength), ::Int64)

Welcome to discourse. Please avoid posting screenshots of your code: it will be easier for us to help you if we can copy-paste your buggy code to try and improve it.

See below for some instructions about how to correctly quote source code here:


As for your problem, I can’t see very well (yet another problem with screenshots), but isn’t the x in your 5th line lowercase when it should be uppercase?

1 Like