Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 프로그래머스
- stepfilter
- 이클립스
- 자바
- LIKE검색
- R명령어
- git오류
- DTO사용이유
- 머신러닝
- 알고리즘
- Eclipse
- git
- JPA
- Rstudio
- core.autocrlf
- R프로그래밍
- querydsl적용하기
- Q타입클래스
- r
- 머신러닝프로세스
- str()
- programmers
- summary()
- 이중배열
- queryDSL
- 한글깨지는문제
- RProgramming
- java
- Spring
- cor()
Archives
- Today
- Total
목록programmers (2)
놀고 싶어요

문제 분류가 떡하니 DFS/BFS로 되어 있다. 문제를 읽다보니 bit masking으로도 풀이가 가능해서 bit masking으로 풀이한 코드를 공유하려고 한다. 비트 마스킹을 이용한 풀이 class Solution { public int solution(int[] numbers, int target) { int answer = 0; // 0 ~ 2^(numbers.length-1) for (int i = 0; i < (1
Algorithm/Programmers
2021. 10. 17. 22:44

package programmers; import java.util.HashSet; import java.util.Set; /** * https://programmers.co.kr/learn/courses/30/lessons/1845 */ public class 폰켓몬 { public static int solution(int[] nums) { int answer = 0; Set n = new HashSet(); // set은 중복이 없음 // nums 배열에 있는 숫자를 입력한다. for(int i=0; i
Algorithm/Programmers
2021. 9. 14. 15:06