mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-09 19:44:45 +08:00
Remove redundant break
in the for loop
Remove redundant `break` in the for loop of python script. When the `return` is triggered, the for loop will break automatically.
PS: really like your work! Thanks a lot 😄 .
This commit is contained in:
@ -125,8 +125,6 @@ class Solution:
|
||||
if record[i] != 0:
|
||||
#record数组如果有的元素不为零0,说明字符串s和t 一定是谁多了字符或者谁少了字符。
|
||||
return False
|
||||
#如果有一个元素不为零,则可以判断字符串s和t不是字母异位词
|
||||
break
|
||||
return True
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user