Merge pull request #60 from halfrost/code_quality_improvement

optimization code quality level from A to A+
This commit is contained in:
halfrost
2020-08-27 01:07:57 +08:00
committed by YDZ
543 changed files with 2463 additions and 2412 deletions

View File

@ -2,9 +2,9 @@ package leetcode
// 解法一 O(n^2)
func isSubsequence(s string, t string) bool {
index, flag := 0, false
index := 0
for i := 0; i < len(s); i++ {
flag = false
flag := false
for ; index < len(t); index++ {
if s[i] == t[index] {
flag = true

File diff suppressed because one or more lines are too long