Timeline for Find the maximum number of consecutive zeros in an array
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 13, 2014 at 19:56 | comment | added | BlueCacti | I don't think you will win (much) by refactoring the if-statement to the Math.Max | |
| May 13, 2014 at 16:41 | comment | added | 200_success |
The logic is certainly cleaner this way. However, with Math.max(), I wouldn't claim that it saves CPU cycles.
|
|
| May 13, 2014 at 8:19 | comment | added | Vogel612 |
I think the inline incrementation of tempLength is difficult to spot and thus maybe a little problematic... Either way, nice point on the if-statement +1
|
|
| May 13, 2014 at 8:15 | history | answered | PKopachevsky | CC BY-SA 3.0 |