본문 바로가기

Java/프로그래머스

(232)
[JAVA] 프로그래머스 - 외계어 사전 https://school.programmers.co.kr/learn/courses/30/lessons/120869 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr         정답  class Solution { public int solution(String[] spell, String[] dic) { int answer = 2; int count =0; for(int i=0; i
[JAVA] 프로그래머스 - 삼각형의 완성 조건(2) https://school.programmers.co.kr/learn/courses/30/lessons/120868 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr      정답  import java.util.Arrays;class Solution { public int solution(int[] sides) { int answer = 0; Arrays.sort(sides); //a>b int a = sides[1]; int b = sides[0]; ..
[JAVA] 프로그래머스 - 안전지대 https://school.programmers.co.kr/learn/courses/30/lessons/120866 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr       시도 1) class Solution { public int solution(int[][] board) { int answer = 0; int boardlen = board.length*board.length; for(int i=0; i  문제 풀이  [JAVA] 프로그래머스 Lv.0 - 안전지대 — 프로그래밍 고난일지 (tisto..
[JAVA] 프로그래머스 - 숨어있는 숫자의 덧셈(2) https://school.programmers.co.kr/learn/courses/30/lessons/120864 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr      문제 풀이 [Java] 자바 정규 표현식 (Pattern, Matcher) 사용법 & 예제 (tistory.com) [Java] 자바 정규 표현식 (Pattern, Matcher) 사용법 & 예제정규표현식(Regular Expression)이란 컴퓨터 과학의 정규언어로부터 유래한 것으로 특정한 규칙을 가진 문자열의 집합을 표현하기 위해 쓰이는 형식언어 입니다. 개발을 하다보면 전화번호, 주..
[JAVA] 프로그래머스 - 다항식 더하기 https://school.programmers.co.kr/learn/courses/30/lessons/120863 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr       시도 1) class Solution { public String solution(String polynomial) { StringBuilder answer = new StringBuilder(); int x0 = 0; // 상수항 int x1 = 0; // 일차항 polynomial = polynomial.replac..
[JAVA] 프로그래머스 - 최댓값 만들기(2) https://school.programmers.co.kr/learn/courses/30/lessons/120862 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr       정답  class Solution { public int solution(int[] numbers) { int answer = Integer.MIN_VALUE; for (int i = 0; i    다른 사람의 풀이  import java.util.*;class Solution { public int solution(int[] number..
[JAVA] 프로그래머스 - 캐릭터의 좌표 https://school.programmers.co.kr/learn/courses/30/lessons/120861 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr     - up,down, left, right 방향으로 이동한 결과가 각 세로, 가로 크기와 같다면 세로,가로크기를 return 정답  class Solution { public int[] solution(String[] keyinput, int[] board) { int[] answer = {0,0}; int length = board[1]/2; //..
[JAVA] 프로그래머스 - 직사각형 넓이 구하기 코딩테스트 연습 - 직사각형 넓이 구하기 | 프로그래머스 스쿨 (programmers.co.kr) 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr     정답   class Solution { public int solution(int[][] dots) { int answer = 0; int x_max = -256; int x_min = 256; int y_max = -256; int y_min = 256; for(int i=0; i