Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Timeline for Find the Infinity Words!

Current License: CC BY-SA 3.0

16 events
when toggle format what by license comment
Jun 17, 2020 at 9:04 history edited Community Bot
Commonmark migration
Aug 30, 2017 at 12:12 history edited Kevin Cruijssen CC BY-SA 3.0
Converted to Java 8 and boolean for -25 bytes
Apr 13, 2017 at 12:39 history edited Community Bot
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Nov 16, 2016 at 11:59 history edited Kevin Cruijssen CC BY-SA 3.0
Realized I can golf 19 more bytes by removing the temporary int variables and return directly
Oct 18, 2016 at 15:04 comment added Olivier Grégoire "int" + "?1:0" is 7 characters long. "boolean" is 7 characters long. I don't see why you return an "int" value. In Java 8, it'd be shorter to use the boolean return type. Also, remove the "length is 5" condition: the OP says they're not "valid", not that you shouldn't return something falsy. Also given that no truthy/falsy, an exception is considered "false", just use that to your advantage.
Oct 18, 2016 at 12:24 comment added Kevin Cruijssen @KarlNapf Ah, I misinterpreted your comment a few hours ago. I've implemented your derived formula for a whopping -63 bytes. :) Thanks.
Oct 18, 2016 at 12:23 history edited Kevin Cruijssen CC BY-SA 3.0
-63 bytes thanks to @KarlNapf's derived formula
Oct 18, 2016 at 9:10 history edited Kevin Cruijssen CC BY-SA 3.0
Added explanation of the four rules now that the checks are golfed to `z*y>0` instead of `z>0&y>0`
Oct 18, 2016 at 6:50 history edited Kevin Cruijssen CC BY-SA 3.0
-8 bytes by multiplying the positive checks (since if one of them is negative or zero, the check would return false)
Oct 17, 2016 at 21:27 comment added Karl Napf Your booleans can be optimized: z,x and w,y must have an alternating sign, so it suffices to check z*x<0 and w*y<0
Oct 17, 2016 at 17:18 comment added Kevin Cruijssen @dpa97 Thanks for the reminder to use char[] as input instead of String. -38 bytes thanks to you.
Oct 17, 2016 at 17:17 history edited Kevin Cruijssen CC BY-SA 3.0
String to char[] for -39 bytes
Oct 17, 2016 at 16:08 comment added dpa97 I got it down to 215 converting s to a char[] char[]c=s.toCharArray();int z=c[1]-c[0],y=c[2]-c[1],...
Oct 17, 2016 at 15:32 comment added Arnauld +1 to compensate the unexplained downvote ... As far as I can tell, this is a perfectly functional solution.
Oct 17, 2016 at 14:56 history edited Kevin Cruijssen CC BY-SA 3.0
Added which of the four rules applies to which word
Oct 17, 2016 at 14:43 history answered Kevin Cruijssen CC BY-SA 3.0
toggle format

AltStyle によって変換されたページ (->オリジナル) /