Skip to content

Latest commit

 

History

History
12 lines (11 loc) · 235 Bytes

1920. 基于排列构建数组.md

File metadata and controls

12 lines (11 loc) · 235 Bytes
class Solution {
    public int[] buildArray(int[] nums) {
        int[] ans = new int[nums.length];
        for (int i = 0; i < ans.length; i++) {
            ans[i] = nums[nums[i]];
        }
        return ans;
    }
}