4 ms·
What I really want is isoddapi.xyz. Just like the npm package, all it should do is call isevenapi.xyz and invert the result.
by KMnO4 2y ago
What I really want is isoddapi.xyz.
Just like the npm package, all it should do is call isevenapi.xyz and invert the result.
- yakshaving_jgt 2y agoI hope someone sets up isthirteenapi.xyz.
- Medox 2y agoisprimeapi.xyz would be helpful.
- Voklen 2y agoJust made it, enjoy :) https://api.isprimeapi.xyz/api/isprime/7 https://api.isprimeapi.xyz/api/isprime/7
- pimlottc 2y agoI'd like to see isfizzbuzz.xyz. Ideally, before 11:30 AM ET this Friday.
- bliteral 2y agohttps://api.isfizzbuzz.xyz/ https://api.isfizzbuzz.xyz/ Cheers!
- ikari_pl 2y agoso many coding interviews will change forever
- plingbang 2y agoAwesome but seem to fail on some numbers e.g. https://api.isfizzbuzz.xyz/api/150000000000000000000000000000000000000000000000000000000000 https://api.isfizzbuzz.xyz/api/15000000000000000000000000000... BTW, there are neat divisibility rules which can give you the answer in practically linear time when the number is in decimal: https://en.wikipedia.org/wiki/Divisibility_rule https://en.wikipedia.org/wiki/Divisibility_rule
- bliteral 2y agoClever! I found another simple alternative though.
- fragmede 2y agoThe error response telling me to upgrade to a paid plan isn't in json. Also, I broke something, maybe in the caching logic. I tried 99999999 then 999999 then 99999 and down, and now I'm currently getting. ~$ curl https://api.isfizzbuzz.xyz/api/9 Invalid number. Please upgrade to a paid plan to use imaginary, non-real, or non-numeric numbers. also fails on 8.
- bliteral 2y agoWhoops, fixed and fixed! And regression tests added. I had made a silly, silly mistake when I went to restrict numbers longer than 7 digits from the "free plan", I had at the same time disallowed digits larger than 7 as being "valid digits", so anything with an 8 or a 9 had been "invalid".
- another2another 2y agoPutting the 'micro' into microservices one bit of logic at-a-time :)
- drexlspivey 2y agoAnd then isevenapi.xyz should call isoddapi.xyz and invert the result to offload all the work to them.
- deleted 2y ago[deleted]