Skip to content

Commit 7b8fc54

Browse files
committed
22w8: add 1920 js solution
1 parent 10baccf commit 7b8fc54

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
| # | Title | Solution | Difficulty |
88
|---| ----- | -------- | ---------- |
99
|1929|[Concatenation of Array](https://leetcode.com/problems/concatenation-of-array/) | [js](./algorithms/concatenationOfArray/Solution.js) |Easy|
10+
|1920|[Concatenation of Array](https://leetcode.com/problems/build-array-from-permutation/) | [js](./algorithms/buildArrayFromPermutation/Solution.js) |Easy|
1011
|1464|[Maximum Product of Two Elements in An Array](https://leetcode.com/problems/maximum-product-of-two-elements-in-an-array/)| [java](./algorithms/maximumProductOfTwoElementsInAnArray/Solution.java) [java_dream](./algorithms/maximumProductOfTwoElementsInAnArray_Dream/maximumProductOfTwoElementsInAnArray_Dream.java)|Easy|
1112
|1207|[Unique Number of Occurrences](https://leetcode.com/problems/unique-number-of-occurrences/) | [java_dream](./algorithms/uniqueNumberOfOccurrences/uniqueNumberOfOccurrences.java)|Easy|
1213
|1179|[Reformat Department Table](https://leetcode.com/problems/reformat-department-table/)| [Mysql](./algorithms/reformatDepartmentTable/Solution.sql) |Easy|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* @param {number[]} nums
3+
* @return {number[]}
4+
*/
5+
var buildArray = function(nums) {
6+
return nums.map(num => nums[num]);
7+
};

0 commit comments

Comments
 (0)