Skip to content

Commit 53b4237

Browse files
add 1920
1 parent e2d40a8 commit 53b4237

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ _If you like this project, please leave me a star._ ★
88

99
| # | Title | Solutions | Video | Difficulty | Tag 1
1010
|-----|----------------|---------------|--------|-------------|-------------
11+
|1920|[Build Array from Permutation](https://leetcode.com/problems/build-array-from-permutation/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1920.java) ||Easy||
1112
|1913|[Maximum Product Difference Between Two Pairs](https://leetcode.com/problems/maximum-product-difference-between-two-pairs/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1913.java) ||Easy|Sort|
1213
|1910|[Remove All Occurrences of a Substring](https://leetcode.com/problems/remove-all-occurrences-of-a-substring/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1904.java) ||Medium|String|
1314
|1909|[Remove One Element to Make the Array Strictly Increasing](https://leetcode.com/problems/remove-one-element-to-make-the-array-strictly-increasing/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_1909.java) ||Easy|Array|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.fishercoder.solutions;
2+
3+
public class _1920 {
4+
public static class Solution1 {
5+
public int[] buildArray(int[] nums) {
6+
int[] ans = new int[nums.length];
7+
for (int i = 0; i < nums.length; i++) {
8+
ans[i] = nums[nums[i]];
9+
}
10+
return ans;
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)