์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
Tags
- ๋ฐฑ์ค
- ์ต๋จ๊ฒฝ๋ก
- counting elements
- beandefinitionstoreexception
- brute force
- ํ์๋ฒ
- HTTP
- springboot
- ์์
- 2018 KAKAO BLIND RECRUITMENT
- ์ฝ๋ฉํ ์คํธ
- Spring
- BFS
- ๋ผ์ด๋ธํ ํ๋ฆฟ
- javascript
- java
- Dijkstra
- spring security
- ํ๋ก๊ทธ๋๋จธ์ค
- Greedy
- ๋ฌธ์์ด
- codility
- API
- ์๊ณ ๋ฆฌ์ฆ
- Python
- error
- 2981
- ํ์ด์ฌ
- algorithm
- applicationeventpublisher
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 |