본문 바로가기
728x90
반응형

분류 전체보기140

99클럽 3기 코테 스터디 41일차 TIL 코드 class Solution { public int solution(int[] money) { int[] dp_first = new int[money.length]; int[] dp_second = new int[money.length]; for(int i = 0; i    #99클럽 #코딩테스트 준비 #개발자 취업 #항해99 #TIL 2024. 8. 31.
99클럽 3기 코테 스터디 28일차 TIL /[백준] 1874번 스택 수열 1. 오늘의 학습 문제 문제 https://www.acmicpc.net/problem/1874       코드import java.io.*;import java.util.ArrayDeque;import java.util.LinkedList;import java.util.Stack;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.o.. 2024. 8. 18.
99클럽 3기 코테 스터디 27일차 TIL /[프로그래머스] 공 이동 시뮬레이션 1. 오늘의 학습 문제 문제    https://school.programmers.co.kr/learn/courses/30/lessons/87391 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr    코드class Solution { public long solution(int n, int m, int x, int y, int[][] queries) { long left = y; long right = y; long top = x; long bottom = x; for (int i = que.. 2024. 8. 17.
99클럽 3기 코테 스터디 26일차 TIL /[프로그래머스] 개인정보 수집 유효기간 자바 풀이 (2023 KAKAO BLIND RECRUITMENT ) 1. 오늘의 학습 문제 문제 https://school.programmers.co.kr/learn/courses/30/lessons/150370# 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr       코드import java.util.*;class Solution { public int[] solution(String today, String[] terms, String[] privacies) { ArrayList answer=new ArrayList(); HashMap map = new HashMap(); fo.. 2024. 8. 16.
99클럽 3기 코테 스터디 25일차 TIL /[프로그래머스] 순위 자바 1. 오늘의 학습 문제 문제 https://school.programmers.co.kr/learn/courses/30/lessons/49191 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr       코드import java.util.*;class Solution { static ArrayList> defeat; //내가 이기는 선수 static ArrayList> lose; //내가 지는 선수 //각 ArrayList를 BFS 탐색했을 때 방문한 노드의 수 합이 n이면 순위를 매길 수 있음 static int people; .. 2024. 8. 16.
99클럽 3기 코테 스터디 24일차 TIL /[프로그래머스] 가장 먼 노드 자바 풀이BFS 1. 오늘의 학습 문제 문제https://school.programmers.co.kr/learn/courses/30/lessons/49189 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr        코드 import java.util.*;class Solution { ArrayList> graph = new ArrayList(); //인접 리스트에 그래프 저장 public int solution(int n, int[][] edge) { for(int i = 0 ; i ()); for (int[] i : edge) { i.. 2024. 8. 14.
99클럽 3기 코테 스터디 23일차 TIL /[LeetCode] 502.IPO 자바 풀이 1. 오늘의 학습 문제 문제https://leetcode.com/problems/ipo/         코드class Solution { public int findMaximizedCapital(int k, int w, int[] profits, int[] capital) { int n = capital.length; PriorityQueue q1 = new PriorityQueue((a, b) -> a[0] - b[0]); for (int i = 0; i q2 = new PriorityQueue((a, b) -> b - a); while (k-- > 0) { while (!q1.isEmpty() && q1.peek()[0]  .. 2024. 8. 13.
99클럽 3기 코테 스터디 22일차 TIL /[LeetCode] Maximal Rectangle 자바 1. 오늘의 학습 문제 문제   https://leetcode.com/problems/maximal-rectangle/  85. Maximal RectangleHard10598185Add to ListShareGiven a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example 1:Input: matrix = [["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]]Output: 6Explanation: The maximal recta.. 2024. 8. 12.
99클럽 3기 코테 스터디 21일차 TIL /[프로그래머스] 정수 삼각형 자바 풀이, 동적계획법 1. 오늘의 학습 문제 문제https://school.programmers.co.kr/learn/courses/30/lessons/43105 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr     문제 설명위와 같은 삼각형의 꼭대기에서 바닥까지 이어지는 경로 중, 거쳐간 숫자의 합이 가장 큰 경우를 찾아보려고 합니다. 아래 칸으로 이동할 때는 대각선 방향으로 한 칸 오른쪽 또는 왼쪽으로만 이동 가능합니다. 예를 들어 3에서는 그 아래칸의 8 또는 1로만 이동이 가능합니다.삼각형의 정보가 담긴 배열 triangle이 매개변수로 주어질 때, 거쳐간 숫자의 최댓값을.. 2024. 8. 11.
728x90
반응형