알고리즘/[프로그래머스] JAVA92 [코딩 기초 트레이닝] 정사각형으로 만들기 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181830 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int[][] solution(int[][] arr) { int max = Math.max(arr.length, arr[0].length); int[][] answer = new int[max][max]; for(int i = 0; i 2024. 3. 5. [코딩 기초 트레이닝] 그림 확대 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181836 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : import java.util.*; class Solution { public String[] solution(String[] picture, int k) { List li = new ArrayList(); int len = picture.length; for(int i = 0; i 2024. 3. 5. [코딩 기초 트레이닝] 특별한 2차원 배열 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181831 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int solution(int[][] arr) { for(int i = 0; i 2024. 3. 5. [코딩 기초 트레이닝] 전국 대회 선발 고사 | HashMap 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181851 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : import java.util.HashMap; import java.util.Collections; import java.util.ArrayList; class Solution { public int solution(int[] rank, boolean[] attendance) { HashMap map = new HashMap(); ArrayList list = new Array.. 2024. 2. 13. [코딩 기초 트레이닝] qr code 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181903 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public String solution(int q, int r, String code) { String answer = ""; for(int i =0; i 2024. 2. 12. [코딩 기초 트레이닝] 세로 읽기 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181904 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public String solution(String my_string, int m, int c) { String answer = ""; for(int i = c-1; i 2024. 2. 12. [코딩 기초 트레이닝] 문자열 뒤집기 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181905 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : import java.util.*; class Solution { public String solution(String my_string, int s, int e) { StringBuilder sb = new StringBuilder(); StringBuilder rv = new StringBuilder(); sb.append(my_string.substring(0,s)); r.. 2024. 2. 12. [코딩 기초 트레이닝] 접두사인지 확인하기 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181906 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int solution(String my_string, String is_prefix) { int answer = 0; for(int i = 0; i 2024. 2. 12. [코딩 기초 트레이닝] 문자열의 앞의 n글자 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181907 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public String solution(String my_string, int n) { return my_string.substring(0,n); } } 2024. 2. 12. [코딩 기초 트레이닝] 이차원 배열 대각선 순회하기 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181829 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int solution(int[][] board, int k) { int answer = 0; for(int i = 0; i 2024. 2. 10. [코딩 기초 트레이닝] 커피 심부름 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181837 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int solution(String[] order) { int answer = 0; for(String menu : order){ if(menu.contains("americano") || menu.contains("anything")){ answer += 4500; }else{ answer += 5000; } } return answ.. 2024. 2. 10. [코딩 기초 트레이닝] 특별한 이차원 배열 1 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181833 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int[][] solution(int n) { int[][] answer = new int[n][n]; for(int i = 0; i 2024. 2. 10. 이전 1 2 3 4 5 ··· 8 다음