일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- SQL 고득점 KIT
- 문자열
- 너비 우선 탐색
- DP
- 소프티어
- dfs
- 파이썬
- Typescript
- 스택
- Lv. 2
- C언어
- programmers
- softeer
- javascript
- 다이나믹프로그래밍
- Dynamic Programming
- 브루트포스
- Stack
- Lv. 0
- level3
- bfs
- Python
- group by
- 프로그래머스
- Java
- Lv. 3
- 자바스크립트
- level 3
- 타입스크립트
- Lv. 1
- Today
- Total
목록개발 언어 입문 (57)
몸과 마음이 건전한 SW 개발자
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/12977?language=javascript 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드function solution(nums) { const eratosthenes = (num) => { for (let factor = 2; factor 풀이 방법에라스토테네스의 채를 이용해서 소수인 경우 true가 나오는 함수를 만든다.2에서 X의 제곱근까지 1씩 더해가며 X가 나누어 떨어지는지 확인한다.나누어 떨어지면 소수가 아..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/68935 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드class Solution { public int solution(int n) { int answer = 0; StringBuilder sb = new StringBuilder(); while (n > 0) { sb.append(n % 3); n = n / 3; } int len..
문제 링크https://school.programmers.co.kr/learn/courses/30/lessons/155652# 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr정답 코드import java.util.*;class Solution { public String solution(String s, String skip, int index) { String answer = ""; int lenS = s.length(); int lenSkip = skip.length(); Map skip..
사용 방법ord("A") # 65chr(65) # A문자를 아스키 코드 숫자로 변환 : ORD아스키 코드 숫자를 문자로 변환 : CHR
기본 조건문 let answer = 0; for (let i = 1; i < 11; i++) { if (answer) { answer += i; } else { answer = 1; }; }; console.log(answer); // 55 리펙토링 let newAnswer = 0; for (let j = 1; j < 11; j++) { newAnswer = newAnswer + j || 1; }; console.log(newAnswer); // 55 설명 기존 조건문은 if 와 else로 나눠서 answer값이 존재하면 i를 더해주고 아니면 answer는 1이된다. 총 길이는 7줄이다. 리펙토링을 한 경우 newAnswer가 존재할 경우 j를 더해주고 아니면 위와 동일하게 1이 된다. 총 길이는 3줄이..
구현 class heapq { constructor() { this.heap = []; }; size() { return this.heap.length; }; swap(left, right) { [this.heap[left], this.heap[right]] = [this.heap[right], this.heap[left]]; }; heappush(value) { this.heap.push(value); this.bubbleUp(); }; bubbleUp() { let son = this.heap.length - 1; let parent = Math.floor((son - 1) / 2); while (parent >= 0 && this.heap[son] < this.heap[parent]) { this...