컴퓨터/프로그래머스 (75) 썸네일형 리스트형 프로그래머스 - 42578번: 의상 [Java] 문제: https://school.programmers.co.kr/learn/courses/30/lessons/42578 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. 코드 import java.util.*; class Solution { public int solution(String[][] clothes) { int answer = 1; Map cnt = new HashMap(); for(int i = 0; i < clothes.length; i++) { if(!cnt.containsKey(clothes[i][1])) cnt.put(clothes.. 프로그래머스 - 131127번: 할인 행사 [Java] 문제: https://school.programmers.co.kr/learn/courses/30/lessons/131127 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. 코드 import java.util.*; class Solution { public int solution(String[] want, int[] number, String[] discount) { int answer = 0; Map map = new HashMap(); for(String w : want) map.put(w, 0); for(int i = 0; i 프로그래머스 - 17680번: [1차] 캐시 [Java] 문제: https://school.programmers.co.kr/learn/courses/30/lessons/17680 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. 코드 import java.util.*; class Solution { public int solution(int cacheSize, String[] cities) { int answer = 0; Queue cache = new LinkedList(); for(String s : cities) { s = s.toLowerCase(); if(cache.contains(s)) { answ.. 프로그래머스 - 12949번: 행렬의 곱셈 [Java] 문제: https://school.programmers.co.kr/learn/courses/30/lessons/12949 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. 코드 class Solution { public int[][] solution(int[][] arr1, int[][] arr2) { int[][] answer = new int[arr1.length][arr2[0].length]; for(int i = 0; i < answer.length; i++) { for(int j = 0; j < answer[0].length; j++) { fo.. 프로그래머스 - 87390번: n^2 배열 자르기 [Java] 문제: https://school.programmers.co.kr/learn/courses/30/lessons/87390 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. 코드 import java.util.*; class Solution { public List solution(int n, long left, long right) { List list = new ArrayList(); long cnt = left / n * n; for(long i = left / n; i right) break; for(long .. 프로그래머스 - 42747번: H-Index [Java] 문제: https://school.programmers.co.kr/learn/courses/30/lessons/42747 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. 코드 import java.util.*; class Solution { public int solution(int[] citations) { Arrays.sort(citations); int answer = 0; for(int i = 0; i 프로그래머스 - 131701번: 연속 부분 수열 합의 개수 [Java] 문제: https://school.programmers.co.kr/learn/courses/30/lessons/131701 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. 코드 import java.util.*; class Solution { public int solution(int[] elements) { Set set = new HashSet(); for(int i = 0; i < elements.length; i++) { int sum = 0; for(int j = 0; j < elements.length; j++) { sum += elemen.. 프로그래머스 - 76502번: 괄호 회전하기 [Java] 문제: https://school.programmers.co.kr/learn/courses/30/lessons/76502 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. 코드 import java.util.*; class Solution { public int solution(String s) { int answer = 0; for(int i = 0; i < s.length(); i++) { Stack stack = new Stack(); for(String str : s.split("")) { if(stack.isEmpty()) stack.push(.. 이전 1 2 3 4 5 6 7 ··· 10 다음 목록 더보기