Skip to content

Commit e0cfa5c

Browse files
committed
May 06
1 parent 76d4374 commit e0cfa5c

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Solution:
2+
def buildArray(self, nums: list[int]) -> list[int]:
3+
return [nums[nums[i]] for i in range(len(nums))]
4+
5+
6+
def main():
7+
nums = [0, 2, 1, 5, 3, 4]
8+
assert Solution().buildArray(nums) == [0, 1, 2, 4, 5, 3]
9+
10+
nums = [5, 0, 1, 2, 3, 4]
11+
assert Solution().buildArray(nums) == [4, 5, 0, 1, 2, 3]
12+
13+
14+
if __name__ == '__main__':
15+
main()

2025-05-May-LeetCoding-Challenge/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| May 03 | [1007. Minimum Domino Rotations For Equal Row](https://leetcode.com/problems/minimum-domino-rotations-for-equal-row/) | Medium | Solved |
1010
| May 04 | [1128. Number of Equivalent Domino Pairs](https://leetcode.com/problems/number-of-equivalent-domino-pairs/) | Easy | Solved |
1111
| May 05 | [790. Domino and Tromino Tiling](https://leetcode.com/problems/domino-and-tromino-tiling/) | Medium | Solved |
12-
| May 06 | []() | | |
12+
| May 06 | [1920. Build Array from Permutation](https://leetcode.com/problems/build-array-from-permutation/) | Easy | Solved |
1313
| May 07 | []() | | |
1414
| May 08 | []() | | |
1515
| May 09 | []() | | |
@@ -40,6 +40,6 @@
4040
## Summary
4141
| Level | Problems | Solved | Unsolved |
4242
| --- | --- | --- | --- |
43-
| Easy | 1 | 1 | 0 |
43+
| Easy | 2 | 2 | 0 |
4444
| Medium | 3 | 3 | 0 |
4545
| Hard | 1 | 1 | 0 |

0 commit comments

Comments
 (0)