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 Answer

deleted 7 characters in body
Source Link
Mayube
  • 11.8k
  • 3
  • 50
  • 93

C# (.NET Core) with Linq, (削除) 32 (削除ここまで) 26 bytes

a=>a.Select((n,i)=>a[i^]=>a[i^1])

Try it online! Try it online!

-8 bytes thanks to m90's witchcraft

C# (.NET Core), 73 bytes

a=>{for(int i=0,d=0;i<a.Length;i++){d=a[i];a[i]=a[++i];a[i]=d;}return a;}

Try it online!

C# (.NET Core) with Linq, (削除) 32 (削除ここまで) 26 bytes

a=>a.Select((n,i)=>a[i^])

Try it online!

-8 bytes thanks to m90's witchcraft

C# (.NET Core), 73 bytes

a=>{for(int i=0,d=0;i<a.Length;i++){d=a[i];a[i]=a[++i];a[i]=d;}return a;}

Try it online!

C# (.NET Core) with Linq, (削除) 32 (削除ここまで) 26 bytes

a=>a.Select((n,i)=>a[i^1])

Try it online!

-8 bytes thanks to m90's witchcraft

C# (.NET Core), 73 bytes

a=>{for(int i=0,d=0;i<a.Length;i++){d=a[i];a[i]=a[++i];a[i]=d;}return a;}

Try it online!

Source Link
Mayube
  • 11.8k
  • 3
  • 50
  • 93

C# (.NET Core) with Linq, (削除) 32 (削除ここまで) 26 bytes

a=>a.Select((n,i)=>a[i^])

Try it online!

-8 bytes thanks to m90's witchcraft

C# (.NET Core), 73 bytes

a=>{for(int i=0,d=0;i<a.Length;i++){d=a[i];a[i]=a[++i];a[i]=d;}return a;}

Try it online!

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