Timeline for Find the maximum number of consecutive zeros in an array
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| S May 14, 2014 at 14:21 | history | suggested | BeetDemGuise | CC BY-SA 3.0 |
Fixed some grammatical errors.
|
| May 14, 2014 at 13:40 | review | Suggested edits | |||
| S May 14, 2014 at 14:21 | |||||
| May 13, 2014 at 17:30 | history | edited | 200_success | CC BY-SA 3.0 |
added 5 characters in body
|
| May 13, 2014 at 17:16 | history | edited | chillworld | CC BY-SA 3.0 |
added 1 character in body
|
| May 13, 2014 at 17:15 | comment | added | chillworld | @200_success your right, I'll edit it | |
| May 13, 2014 at 17:06 | comment | added | Cruncher | @chillworld The original code works as well. The point of code review to produce better code. FYI, I would put some whitespace in that ternary. Probably a newline after the ?, and after the : such that tempLength and 0 line up. | |
| May 13, 2014 at 16:57 | comment | added | 200_success |
It works, but tempLength = (value == target) ? 1 + tempLength : 0 would have been better. Same number of symbols, ignoring whitespace.
|
|
| May 13, 2014 at 16:48 | comment | added | chillworld | @200_success but it works or not :) | |
| May 13, 2014 at 16:36 | comment | added | 200_success |
tempLength = ++tempLength is weird, since the ++ operator already performs an assignment. It takes me a minute to convince myself that it works.
|
|
| May 13, 2014 at 8:31 | history | edited | Vogel612 | CC BY-SA 3.0 |
corrected minor grammar errors, clarified order in foreach loops
|
| May 13, 2014 at 8:27 | history | answered | chillworld | CC BY-SA 3.0 |