일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 알고리즘
- algorithm
- 모던자바
- 프로젝트
- 프로그래머스
- DP
- 운영체제
- 백트래킹
- backtracking
- lambda
- Java8
- BFS
- DFS
- TDD
- 자바
- programmers
- LEVEL2
- 그래프
- back-end
- 코틀린
- 네트워크
- kotlin
- OS
- Spring
- baekjoon
- 백준
- 자료구조
- java
- Brute-force
- 스프링
- Today
- Total
목록알고리즘 (63)
요깨비's LAB
import java.util.*; class Solution { public int[] solution(String[][] places) { int[] answer = new int[5]; int caseLen = places.length; for (int i = 0; i < 5; i++) { char[][] map = new char[5][5]; List participants = new ArrayList(); for (int j = 0; j < 5; j++) { char[] carr = places[i][j].toCharArray(); for (int k = 0; k < 5; k++) { if (carr[k] == 'P') { participants.add(new Participant(j, k));..
import java.util.* fun main() { val scr = Scanner(System.`in`) var str = scr.nextLine(); var len = str.length var idx = 0 var startIdx = 0 var endIdx = 0 var result = "" var substr = "" var findIdx = 0 while(idx < len) { if(str[0] == '') substr = str.substring(0, findIdx + 1) result += substr str = str.substring(findIdx + 1) len = str.length } else { findIdx = str.indexOfFirst { it == '
import java.io.IOException; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int row; static int col; public static void main(String[] args) throws IOException { Scanner scr = new Scanner(System.in); int cheeseCnt = 0; row = scr.nextInt(); col = scr.nextInt(); int[][] map = new int[row][col]; for (int i = 0; i < row; i++) { for (int j = 0;..
풀이 힌트는 결국 인터넷을 통해 알게 되었으며 구현만큼은 스스로의 힘으로 구현하였습니다. import java.util.*; class Solution { public static int orderLen; public static Map map = new HashMap(); public String[] solution(String[] orders, int[] course) { String[] answer; int ordersLen = orders.length; for (String order : orders) { char[] carr = order.toCharArray(); Arrays.sort(carr); orderLen = order.length(); for (int i = 0; i < orderLe..
import java.util.* fun main() { val scr = Scanner(System.`in`) val N = scr.nextInt() val K = scr.nextInt() val queue = LinkedList() for (i in 1..N) { queue.add(i) } var queueSize = queue.size var count = 1 var result = "" print(result) }
class Solution { public int[] solution(int rows, int columns, int[][] queries) { int[] answer = {}; Matrix matrix = new Matrix(rows, columns); int queryCount = queries.length; answer = new int[queryCount]; for(int i=0;i col1; i--) { matrix[row2][i-1] = copyMatrix[row2][i]; if(min > copyMatrix[row2][i]) { min = copyMatrix[row2][i]; } } for (int i = row2; i > row1; i--) { matrix[i-1][col1] = copyM..
import java.util.* class Solution { public int solution(String str1, String str2) { int answer = 0; str1 = str1.toUpperCase(); str2 = str2.toUpperCase(); Map str1Map = new HashMap(); Map str2Map = new HashMap(); setMap(str1Map, str1); setMap(str2Map, str2); double intersaction = getIntersection(str1Map, str2Map); double union = getUnion(str1Map, str2Map); double value = 1; if((int)union == 0 && ..
import java.util.HashMap; import java.util.Map; class Solution { static boolean[] isVisited = new boolean[8]; static String[] characters = {"A", "C", "F", "J", "M", "N", "R", "T"}; static int result = 0; public int solution(int n, String[] data) { int answer = 0; result = 0; for (int i = 0; i < 8; i++) { Map map = new HashMap(); isVisited[i] = true; int index = 0; map.put(characters[i], index); ..