mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-05 00:25:22 +08:00
Merge pull request #60 from halfrost/code_quality_improvement
optimization code quality level from A to A+
This commit is contained in:
@ -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
Reference in New Issue
Block a user