soulmachine / leetcode

LeetCode题解,151道题完整版。
BSD 3-Clause "New" or "Revised" License
11.27k stars 3.43k forks source link

2.1.2 Remove Duplicates from Sorted Array II #56

Open ByzanTine opened 9 years ago

ByzanTine commented 9 years ago

Code 2: There isn't any occur variable in this solution. I am confused by what you are talking about.

vendisky commented 9 years ago

= = 其实soulmachine同学的意思是,上面的代码1,把所有出现的2,改为3,就能解决最多允许3个重复了

ByzanTine commented 9 years ago

Yeah, it certainly make sense, but I think it's better to explicitly declare the occur variable and move this part of comment on code 1. Thanks for the clarification anyway.

vendisky commented 9 years ago

Exactly. The work of soulmachine is brilliant. Nevertheless, we readers should help him to correct some small mistakes.