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

Return to Revisions

3 of 3
added 62 characters in body
xnor
  • 149.6k
  • 26
  • 287
  • 676

Python 3, 47 bytes

f=lambda l,i=3:i+1and abs(l[i]-l[i-1])-f(l,i-1)

Try it online!

Take complex number input. Outputs as Truthy/Falsey swapped. Test cases from Noodle9.


48 bytes

lambda a,b,c,d:A(a-b)+A(c-d)-A(b-c)-A(d-a)
A=abs

Try it online!

xnor
  • 149.6k
  • 26
  • 287
  • 676

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