일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- java
- error
- codility
- 알고리즘
- 파이썬
- 탐욕법
- 최단경로
- javascript
- 소수
- springboot
- API
- counting elements
- Python
- 코딩테스트
- 2981
- Dijkstra
- algorithm
- Spring
- applicationeventpublisher
- 라이브템플릿
- 문자열
- 2018 KAKAO BLIND RECRUITMENT
- beandefinitionstoreexception
- BFS
- HTTP
- spring security
- Greedy
- 백준
- 프로그래머스
- brute force
Archives
- Today
- Total
목록counting elements (1)
Altiora Petamus

PermCheck coding task - Learn to Code - Codility PermCheck coding task - Learn to Code - Codility Check whether array A is a permutation. app.codility.com 🤔생각해보기 주어진 배열이 순열이 맞는지 검사하는 문제 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
2021. 8. 23. 18:36