MethodminDistanceDP, O(nm) Time, O(nm) Space Searching for a path (sequence of edits) from the start string to the final string For two strings, X of length n, Y of le
src/main/java/com/freetymekiyan/algorithms/level/hard/EditDistance.java:34
MethodnumDistinctDP, 2d array as table, Time O(mn), Space O(mn) We keep a m n matrix and scanning through string S, while m = T.length() + 1 and n = S.length() + 1 and
src/main/java/com/freetymekiyan/algorithms/level/hard/DistinctSubsequences.java:38