leetcode 2 sum c LeetCode There is my accpted JAVA and C solution
Index
-
Title Solution Difficulty
-
1 Easy
-
2 Easy
-
3 Easy
-
4 / Easy 2/17
-
5 / Easy 2/17
-
6 Easy 2/17
-
7 Easy 2/26
-
8 Easy 2/26
-
9 Easy 2/26
-
10 Easy 2/27
-
11 Easy 2/28
-
12 Easy 3/1
-
13 Medium 3/1
notes: String in java is immutable. StringBuilder is mutable, that is it can be modified in memory.
最长公共子序列使用dp[i][j]来表示序列X的i位和序列Y的j位之前的最长公共子序列的长度。如果X[i] == Y[j],dp[i][j] = dp[i + 1][j + 1] + 1;否则dp[i][j] = max{dp[i - 1][j], dp[i][j]}。
暂无评论