반응형 개발92 [Codility] TieRopes coding task ( Greedy algorithm) - Python 풀이 https://app.codility.com/programmers/lessons/16-greedy_algorithms/tie_ropes/ TieRopes coding task - Learn to Code - Codility Tie adjacent ropes to achieve the maximum number of ropes of length >= K. app.codility.com Task description There are N ropes numbered from 0 to N − 1, whose lengths are given in an array A, lying on the floor in a line. For each I (0 ≤ I < N), the length of rope I on the .. 2021. 1. 9. TIL : elasticsearch, kibana 보안 설정하기 elasticsearch 보안 설정 /usr/share/elasticsearch/bin에 있는 elasticsearch-setup-passwords 실행 👉🏻 cd /usr/share/elasticsearch 👉🏻 ./bin/elasticsearch-setup-passwords interactive) 👉🏻 sudo systemctl start elasticsearch.service (elasticsearch 실행) 💢 실행 시 다음과 같은 에러가 뜬다면, Transport SSL must be enabled if security is enabled on a [basic] license. Please set [xpack.security.transport.ssl.enabled] to [true] or dis.. 2021. 1. 6. TIL : elasticsearch 오류 해결 1. kibana 재설치 Kibana에서 status를 보니 다음과 같은 로그가 찍힘 ● kibana.service - Kibana Loaded: loaded (/etc/systemd/system/kibana.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2021-01-05 11:36:08 KST; 1min 15s ago Process: 7276 ExecStart=/usr/share/kibana/bin/kibana (code=exited, status=1/FAILURE) Main PID: 7276 (code=exited, status=1/FAILURE) 1월 05 11:36:08 freew sys.. 2021. 1. 5. TIL : 쿼리 최적화 1. select 시 필요한 컬럼만 불러오기(데이터 과부하) 2. where절에 연산 걸지 않기(전체 table에 연산해야함) 3. LIKE사용시 %를 문자열 앞부분에 넣지 않기(전체 table scan해야함) 4. DISTINCT사용하여 중복 제거하지 않기(시간 많이 걸리기 때문) 5. GROUP BY 연산 시 HAVING 말고 WHERE 쓰기 6. 여러개의 테이블 조인 시 FROM 절에 가장 큰 테이블 배치하기 출처: https://medium.com/watcha/%EC%BF%BC%EB%A6%AC-%EC%B5%9C%EC%A0%81%ED%99%94-%EC%B2%AB%EA%B1%B8%EC%9D%8C-%EB%B3%B4%EB%8B%A4-%EB%B9%A0%EB%A5%B8-%EC%BF%BC%EB%A6%AC%EB.. 2021. 1. 4. 이전 1 ··· 9 10 11 12 13 14 15 ··· 23 다음 more 728x90 반응형