Libraryless. Click here for Pure Java version (36L/1K).
1 | static int[] sortIntArrayInPlaceDesc_crazyNegationAlgorithm(int[] a) { |
2 | if (a == null) null; |
3 | for (int i = 0; i < a.length; i++) |
4 | a[i] = ~a[i]; |
5 | Arrays.sort(a); |
6 | for (int i = 0; i < a.length; i++) |
7 | a[i] = ~a[i]; |
8 | ret a; |
9 | } |
Began life as a copy of #1029069
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035037 |
Snippet name: | sortIntArrayInPlaceDesc_crazyNegationAlgorithm |
Eternal ID of this version: | #1035037/5 |
Text MD5: | 93929367fc3bc1a77f94efeeab3b2a9e |
Transpilation MD5: | 18937a13954aeaca81c6c5cdc2172826 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-25 20:50:14 |
Source code size: | 240 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 144 / 216 |
Version history: | 4 change(s) |
Referenced in: | [show references] |