일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 코딩테스트
- wordcloud
- coursera
- 분산 시스템
- 데이터
- 협업 필터링
- TF-IDF
- 시각화
- Cosine-similarity
- codingtest
- recommendation system
- pytorch
- 프로그래머스
- 딥러닝
- 웹스크래핑
- Tensor
- 부스트캠프
- 코테
- 머신러닝
- 알고리즘
- 데이터 엔지니어링
- Python
- selenium
- SGD
- 백준
- 추천시스템
- Overfitting
- 웹크롤링
- 추천 시스템
- 파이썬
- Today
- Total
목록Algorithm/Codility (11)
개발자식
문제 : PermMissingElem Test results - Codility An array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. Your goal is to find that missing element. Write a function: def solution(A) that, given an arra app.codility.com 나의 코드 - 50% score - 배열 A의 길이가 N-1이라는 점을 고려하지 못했고 비어있을 때도 고려하지 못했다. def solution..
문제 FrogJmp Test results - Codility A small frog wants to get to the other side of the road. The frog is currently located at position X and wants to get to a position greater than or equal to Y. The small frog always jumps a fixed distance, D. Count the minimal number of jumps that the smal app.codility.com 나의 풀이 def solution(X, Y, D): distance = Y-X count=0 if distance !=0: count = distance // ..

2. OddOccurrencesInArray Test results - Codility A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. For example, in arr app.codility.com 나의 풀이 - for문으로 배열을 순회하면서 count() 함수로 개수가 1개이면 바로 return 아니라면 값을 리스트에 넣는다 - ..

2. CyclicRotation Test results - Codility An array A consisting of N integers is given. Rotation of the array means that each element is shifted right by one index, and the last element of the array is moved to the first place. For example, the rotation of array A = [3, 8, 9, 7, 6] is [6, 3, 8, 9, app.codility.com 나의 풀이 - 배열을 복사하여 원본 배열에서 값을 가져와서 복사된 배열에 값을 바꾸고 - k만큼 이동하면 총 길이를 넘어가는 경우와 아닌 경우를 나..
1. iteration 문제 : app.codility.com/programmers/lessons/1-iterations/ def solution(N): binary = format(N, 'b') m = 0 count = 0 for i in binary: if '1' == i: if m < count : m = count count = 0 else : count += 1 return m - binary 값이 정수가 아닌 문자열 - 순환할때 최대한 조건을 간략하게 구현 - 숫자가 1이지만 count가 0 이면 max 값이 바뀌지 않고 초기화까지도 가능