일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- OS
- DP
- 코틀린
- programmers
- lambda
- 운영체제
- back-end
- BFS
- kotlin
- TDD
- 그래프
- 자료구조
- 백트래킹
- algorithm
- 백준
- LEVEL2
- Java8
- baekjoon
- DFS
- Brute-force
- 자바
- 모던자바
- 네트워크
- 프로그래머스
- backtracking
- 알고리즘
- 프로젝트
- Spring
- java
- 스프링
- Today
- Total
목록전체 글 (106)
요깨비's LAB
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); ..
import java.io.BufferedReader import java.io.InputStreamReader import java.util.* fun main() { val br = BufferedReader(InputStreamReader(System.`in`)) val N = br.readLine().toInt() val queue = LinkedList() val sb = StringBuffer() for (i in 0 until N) { val command = br.readLine().split(" ") when { command[0] == "push" -> { queue.add(command[1].toInt()) } command[0] == "pop" -> { if (queue.isEmpt..
LinkedList를 활용해서 풀었습니다. 초기 코드는 시간 초과로 애를 먹었습니다. import java.io.* import java.util.* fun main() { val reader = BufferedReader(InputStreamReader(System.`in`)) val writer = BufferedWriter(OutputStreamWriter(System.`out`)) val str = reader.readLine() val M = reader.readLine().toInt() val linkedList = LinkedList() val listIterator = linkedList.listIterator() while(listIterator.hasNext()) { listIterat..
import java.util.* fun main() { val stack = Stack() val scr = Scanner(System.`in`) val n = scr.nextInt() val list = mutableListOf() val result = mutableListOf() var index = 0 val sb = StringBuffer() for(i in 1 .. n) { list.add(scr.nextInt()) } for(i in 1 .. n) { stack.add(i) sb.append("+\n") while(!stack.isEmpty() && stack.peek() == list[index]) { result.add(stack.pop()) sb.append("-\n") index++..
import java.util.* fun main() { val scr = Scanner(System.`in`) val T = scr.nextInt() scr.nextLine() val sb = StringBuffer() for(i in 0 until T) { val str = scr.nextLine() val elements = str.split(" ") for(element in elements) { sb.append(element.reversed() + " ") } sb.append("\n") } print(sb.toString()) }