Class IntArrayUtils


  • public class IntArrayUtils
    extends Object
    • Method Detail

      • inverse

        public static void inverse​(int[] a)
        Inverses the values of the given array with their indexes. For example, the result for [2, 0, 1] is [1, 2, 0] because a[0]: 2 => a[2]: 0 a[1]: 0 => a[0]: 1 a[2]: 1 => a[1]: 2