Timeline for Finding Local Extremes
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 3, 2019 at 22:53 | history | edited | algorithmshark | CC BY-SA 4.0 |
saved 1 char
|
Feb 27, 2014 at 1:54 | history | edited | algorithmshark | CC BY-SA 3.0 |
bugfix, and saved two characters
|
Feb 27, 2014 at 1:50 | comment | added | algorithmshark | Good catch, and yes, this saves two characters. Updating. | |
Feb 27, 2014 at 1:21 | comment | added | Lord Soth | Also, I do not know about this language, but, instead of taking the signum in the first step, you can leave the difference as it is. Then, in the second step, multiply the elements instead, and in the third you may check if the product is negative (this also avoids that 0 problem). Perhaps this may result in a shorter code. | |
Feb 27, 2014 at 1:19 | comment | added | Lord Soth | Umm, this may not work if the input is, say, 3, 4, 4, 4, 4, 5, i.e. you may get a zero in the "0=" step if 0 is added to 0. | |
Feb 27, 2014 at 0:57 | history | answered | algorithmshark | CC BY-SA 3.0 |