XenoAmess edited a comment on pull request #233:
URL: https://github.com/apache/commons-text/pull/233#issuecomment-848815825


   @ali-ghanbari
   Hi.
   Thanks for your pr.
   The thought is correct, it can save memory from n*m to 2* Math.min(n,m) in 
this way.
   As you refined this function, you can refine **public CharSequence 
longestCommonSubsequence(final CharSequence left, final CharSequence right)** 
as well.
   use 3 numbers(a start-index and an end-index, and the length) to cache the dp
   Of course you can also not cache the length but use start-index and 
end-index to calculate the length dynamically, but it need a jmh performance 
test to see whether way is better.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to