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 2449 additions and 2396 deletions

View File

@ -53,7 +53,7 @@ func calculate1(s string) int {
break
}
}
tmp = string(stack[index+1 : len(stack)])
tmp = string(stack[index+1:])
stack = stack[:index]
res := strconv.Itoa(calculateStr(tmp))
for j := 0; j < len(res); j++ {
@ -98,7 +98,6 @@ func calculateStr(str string) int {
if tmpStr != "" {
num, _ := strconv.Atoi(tmpStr)
nums = append(nums, num)
tmpStr = ""
}
res = nums[0]
for i := 0; i < len(s); i++ {