Timeline for Smallest Integer Disk
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | Community Bot |
Commonmark migration
|
|
| Nov 7, 2018 at 19:48 | comment | added | nwellnhof |
You can probably save a few bytes using Math.hypot.
|
|
| Nov 6, 2018 at 21:59 | comment | added | Kevin Cruijssen |
There are for sure more things to golf, but JS isn't my strong suite. Still, you can golf for(f=c;f<b;f++){for(g=e;g<d;g++){s=a.reduce((o,[p,q])=>o>(r=(p-f)**2+(q-g)**2)?o:r);n=n?n[2]>s?[f,g,s]:n:[f,g,s]}} to for(f=c;f<b;f++)for(g=e;g<d;n=n?n[2]>s?[f,g,s]:n:[f,g,s],g++)s=a.reduce((o,[p,q])=>o>(r=(p-f)**2+(q-g)**2)?o:r);. And I'm pretty sure you can remove the space at return[.
|
|
| Nov 6, 2018 at 19:24 | history | answered | Spitemaster | CC BY-SA 4.0 |