์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- ์์
- javascript
- 2981
- Dijkstra
- API
- 2018 KAKAO BLIND RECRUITMENT
- ํ์ด์ฌ
- counting elements
- HTTP
- ์ฝ๋ฉํ ์คํธ
- algorithm
- ๋ฌธ์์ด
- brute force
- Spring
- spring security
- ์ต๋จ๊ฒฝ๋ก
- BFS
- beandefinitionstoreexception
- ํ์๋ฒ
- ๋ผ์ด๋ธํ ํ๋ฆฟ
- ๋ฐฑ์ค
- java
- codility
- springboot
- Greedy
- applicationeventpublisher
- Python
- error
- ํ๋ก๊ทธ๋๋จธ์ค
- ์๊ณ ๋ฆฌ์ฆ
Archives
- Today
- Total
Altiora Petamus
Perm Check ๋ณธ๋ฌธ
PermCheck coding task - Learn to Code - Codility
๐ค์๊ฐํด๋ณด๊ธฐ
์ฃผ์ด์ง ๋ฐฐ์ด์ด ์์ด์ด ๋ง๋์ง ๊ฒ์ฌํ๋ ๋ฌธ์
set() ์ผ๋ก ๋ณํ ํ ๋น๊ตํ๋ฉด ์์์ ์๊ด์์ด ๋๋ฑํ์ง ๋น๊ต๊ฐ ๊ฐ๋ฅํ๋ฏ๋ก ๊ฐ๋จํ๊ฒ ํด๊ฒฐ์ด ๊ฐ๋ฅํ๋ค.
def solution(A):
n = set([i for i in range(1, len(A) + 1)])
return 1 if n == set(A) else 0
'1day-1algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์ ์ง์ (0) | 2021.08.27 |
---|---|
์ ๋๊ทธ๋จ ๋ง๋ค๊ธฐ (0) | 2021.08.26 |
DNA (0) | 2021.08.22 |
์ธ๋ก์ฝ๊ธฐ (0) | 2021.08.17 |
ํ์ผ๋ช ์ ๋ ฌ (0) | 2021.08.13 |