전체보기
-
프로그래머스 유형별 정리코딩 테스트 2022. 12. 5. 14:39
https://school.programmers.co.kr/learn/challenges?tab=algorithm_practice_kit 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr https://school.programmers.co.kr/learn/courses/14743/14743-%ED%85%8C%EC%8A%A4%ED%8A%B8-314794a7-3111-4c50-afa3-f31536d8b1cc?itm_content=lesson43238 코딩테스트 연습 힌트 모음집 ### 본 강의는 [코딩테스트 연습](https://school.programmer..
-
Trie (트라이)Python/파이썬 자료구조 알고리듬 2022. 12. 5. 11:04
[참고] tistory 코드의 가독성을 높이는 법 나무 위키의 간결한 설명. https://namu.wiki/w/%ED%8A%B8%EB%9D%BC%EC%9D%B4 트라이 - 나무위키 이 저작물은 CC BY-NC-SA 2.0 KR에 따라 이용할 수 있습니다. (단, 라이선스가 명시된 일부 문서 및 삽화 제외) 기여하신 문서의 저작권은 각 기여자에게 있으며, 각 기여자는 기여하신 부분의 저작권 namu.wiki 설명이 너무 잘 되어 있다. 코드까지 ㄷㄷㄷ https://ko.wikipedia.org/wiki/%ED%8A%B8%EB%9D%BC%EC%9D%B4_(%EC%BB%B4%ED%93%A8%ED%8C%85) 트라이 (컴퓨팅) - 위키백과, 우리 모두의 백과사전 위키백과, 우리 모두의 백과사전. "A", "..
-
2020 KAKAO BLIND RECRUITMENT 가사 검색코딩 테스트/Level 4 2022. 12. 4. 22:06
https://school.programmers.co.kr/learn/courses/30/lessons/60060 BF로 확인.. def solution(words, queries): import re answer = [0] * len(queries) for index, query in enumerate(queries): q = re.compile(f"^{query}$".replace("?", ".")) for word in words: if q.search(word) is not None: answer[index] += 1 return answer 당연히.. 정확성 테스트 테스트 1 〉통과 (1.79ms, 10.3MB) 테스트 2 〉통과 (1.12ms, 10.2MB) 테스트 3 〉통과 (1.21ms, ..
-
쿠키 구입코딩 테스트/Level 4 2022. 12. 4. 21:28
https://school.programmers.co.kr/learn/courses/30/lessons/49995 def solution(cookie): def total(a, b): return totals[b] - totals[a] totals = [0] for index, each in enumerate(cookie): totals.append(totals[index] + each) answers = set() total_max = sum(cookie) / 2 for mid in range(1, len(cookie)): first_total_set = set() for first in range(mid, - 1, -1): first_total = total(first, mid) if first_to..
-
[3차] 자동완성코딩 테스트/Level 4 2022. 12. 4. 00:22
https://school.programmers.co.kr/learn/courses/30/lessons/17685 class Node: def __init__(self): self.count = 0 self.children = {} class Trie: def __init__(self): self.root = Node() def insert(self, word): current = self.root for letter in word: if letter not in current.children: current.children[letter] = Node() current = current.children[letter] current.count += 1 def search(self, word): curren..
-
점 찍기코딩 테스트/Level 2 2022. 12. 2. 20:56
https://school.programmers.co.kr/learn/courses/30/lessons/140107 def solution(k, d): answer, d_square = 0, d ** 2 for i in range(0, d + 1, k): answer += int((d_square - i ** 2) ** .5) // k + 1 return answer 테스트 1 〉통과 (0.01ms, 10.1MB) 테스트 2 〉통과 (0.02ms, 10.1MB) 테스트 3 〉통과 (1.58ms, 10.3MB) 테스트 4 〉통과 (0.82ms, 10.2MB) 테스트 5 〉통과 (2.39ms, 10.1MB) 테스트 6 〉통과 (2.09ms, 10.5MB) 테스트 7 〉통과 (1.03ms, 10.1MB) 테스..
-
프로그래머스 / 문자열 나누기코딩 테스트/Level 1 2022. 12. 2. 20:25
https://school.programmers.co.kr/learn/courses/30/lessons/140108 파이썬 def solution(s): first = s[0] new_index = slices = same = no_same = 0 for index, each in enumerate(s): new_index += 1 if each == first: same += 1 else: no_same += 1 if same == no_same: slices += 1 new_index = same = no_same = 0 if index + 1 < len(s): first = s[index + 1] return slices + (1 if new_index else 0) def solution(s): ..
-
파이썬 MS Windows 내장 TTS 활용Python/이것저것 파이썬 2022. 12. 1. 13:10
파이썬 TTS를 검색하면 gTTS가 가장 많이 검색됩니다. 구글의 API를 이용해서 mp3로 받아오는 건데.... 꽤 불편합니다. 윈도우에도 TTS기능이 내장되어 있는데요. 오프라인에서 작동하고, 음질도 나쁘지 않습니다. https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms723627(v=vs.85) Microsoft Speech API (SAPI) 5.3 Table of contents Microsoft Speech API (SAPI) 5.3 Article 04/17/2012 2 minutes to read In this article --> Microsoft Speech API 5.3 Microsoft Speech API (SA..