99클럽
-
- 오늘의 학습 키워드 : DFS, BFS[문제 이름 : 여행경로 (프로그래머스, Lv 3)]문제 url : https://school.programmers.co.kr/learn/courses/30/lessons/43164내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { static ArrayList answer = new ArrayList(); static Map> map = new HashMap(); static int totalTickets; static boolean isComplete = false; public String[] solution(String[][] tickets) { // 총 배열 길이..
99클럽 코테 스터디 34일차 TIL [DFS, BFS]- 오늘의 학습 키워드 : DFS, BFS[문제 이름 : 여행경로 (프로그래머스, Lv 3)]문제 url : https://school.programmers.co.kr/learn/courses/30/lessons/43164내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { static ArrayList answer = new ArrayList(); static Map> map = new HashMap(); static int totalTickets; static boolean isComplete = false; public String[] solution(String[][] tickets) { // 총 배열 길이..
2024.08.24 -
- 오늘의 학습 키워드 : DFS, BFS[문제 이름 : 아이템 줍기 (프로그래머스, Lv 3)]문제 url : https://school.programmers.co.kr/learn/courses/30/lessons/43163내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { public int solution(String begin, String target, String[] words) { boolean isEmpty = true; for(String word : words) { if(word.equals(target)) { isEmpty = false; ..
99클럽 코테 스터디 33일차 TIL [DFS, BFS]- 오늘의 학습 키워드 : DFS, BFS[문제 이름 : 아이템 줍기 (프로그래머스, Lv 3)]문제 url : https://school.programmers.co.kr/learn/courses/30/lessons/43163내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { public int solution(String begin, String target, String[] words) { boolean isEmpty = true; for(String word : words) { if(word.equals(target)) { isEmpty = false; ..
2024.08.23 -
- 오늘의 학습 키워드 : DFS, BFS[문제 이름 : 아이템 줍기 (프로그래머스, Lv 3)]문제 url : https://school.programmers.co.kr/learn/courses/30/lessons/87694내가 작성한 코드는 아래와 같다.import java.util.*;public class Solution { public int solution(int[][] rectangle, int characterX, int characterY, int itemX, int itemY) { int[] dx = {1, -1, 0, 0}; int[] dy = {0, 0, 1, -1}; // 좌표 확장 int[][] board =..
99클럽 코테 스터디 32일차 TIL [DFS, BFS]- 오늘의 학습 키워드 : DFS, BFS[문제 이름 : 아이템 줍기 (프로그래머스, Lv 3)]문제 url : https://school.programmers.co.kr/learn/courses/30/lessons/87694내가 작성한 코드는 아래와 같다.import java.util.*;public class Solution { public int solution(int[][] rectangle, int characterX, int characterY, int itemX, int itemY) { int[] dx = {1, -1, 0, 0}; int[] dy = {0, 0, 1, -1}; // 좌표 확장 int[][] board =..
2024.08.23 -
- 오늘의 학습 키워드 : DFS, BFS[문제 이름 : 네트워크 (프로그래머스, Lv 3)]문제 url : https://leetcode.com/problems/minimum-operations-to-make-a-subsequence/description/내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { static Queue queue = new LinkedList(); public int solution(int n, int[][] computers) { boolean[] visited = new boolean[n]; int answer = 0; // dfs 풀이 방법 // fo..
99클럽 코테 스터디 31일차 TIL [DFS, BFS]- 오늘의 학습 키워드 : DFS, BFS[문제 이름 : 네트워크 (프로그래머스, Lv 3)]문제 url : https://leetcode.com/problems/minimum-operations-to-make-a-subsequence/description/내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { static Queue queue = new LinkedList(); public int solution(int n, int[][] computers) { boolean[] visited = new boolean[n]; int answer = 0; // dfs 풀이 방법 // fo..
2024.08.21 -
- 오늘의 학습 키워드 : BinarySearch[문제 이름 : Maximum Operations to make a Subsequence (리트코드, Hard)]문제 url : https://leetcode.com/problems/minimum-operations-to-make-a-subsequence/description/내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { public int minOperations(int[] target, int[] arr) { // key: target의 값, value: target의 인덱스 (target값은 중복값이 없으므로) Map map = new HashMap(); f..
99클럽 코테 스터디 30일차 TIL [BinarySearch]- 오늘의 학습 키워드 : BinarySearch[문제 이름 : Maximum Operations to make a Subsequence (리트코드, Hard)]문제 url : https://leetcode.com/problems/minimum-operations-to-make-a-subsequence/description/내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { public int minOperations(int[] target, int[] arr) { // key: target의 값, value: target의 인덱스 (target값은 중복값이 없으므로) Map map = new HashMap(); f..
2024.08.20 -
- 오늘의 학습 키워드 : BinarySearch[문제 이름 : Maximum Profit In Job Scheduling (리트코드, Hard) ]문제 url : https://leetcode.com/problems/maximum-profit-in-job-scheduling내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { public int jobScheduling(int[] startTime, int[] endTime, int[] profit) { int jobLen = profit.length; int[][] jobs = new int[jobLen][3]; for(int i=0; i a[1] - b[1]); ..
99클럽 코테 스터디 29일차 TIL [BinarySearch]- 오늘의 학습 키워드 : BinarySearch[문제 이름 : Maximum Profit In Job Scheduling (리트코드, Hard) ]문제 url : https://leetcode.com/problems/maximum-profit-in-job-scheduling내가 작성한 코드는 아래와 같다.import java.util.*;class Solution { public int jobScheduling(int[] startTime, int[] endTime, int[] profit) { int jobLen = profit.length; int[][] jobs = new int[jobLen][3]; for(int i=0; i a[1] - b[1]); ..
2024.08.19