sensitive
sensitive copied to clipboard
更新 Validate() 函数
-
使用两个 for 循环来更新该函数, 没有增加时间复杂度/空间复杂度, 但是更容易理解.
-
使用短赋值语句来减少变量声明.
-
left总小于等于position, 故去掉判断.