Here you can find the source of invertList(int[] pos)
public static int[] invertList(int[] pos)
//package com.java2s; //License from project: Apache License public class Main { public static int[] invertList(int[] pos) { int[] result = new int[pos.length]; for (int i = 0; i < pos.length; i++) { result[pos[i]] = i;/*from ww w . j a v a 2 s . c o m*/ } return result; } }