Lunski's Clutter

This is a place to put my clutters, no matter you like it or not, welcome here.

0%

Given two arrays, write a function to compute their intersection.

Example 1:

1
2
Input: nums1 = [1,2,2,1], nums2 = [2,2]
Output: [2,2]

Example 2:

1
2
Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4]
Output: [4,9]

Note:

1
2
Each element in the result should appear as many times as it shows in both arrays.
The result can be in any order.
Read more »

原子習慣再搭配刻意練習就是堅持每天進步一點點

Read more »

機會存在混亂與逆境中
刻意製造混亂讓自己成長
走錯了也沒關係,說不定是另一條正確的路

Read more »

In Pascal’s triangle, each number is the sum of the two numbers directly above it.

Example:

1
2
3
4
5
6
7
8
9
Input: 5
Output:
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
Read more »