본문 바로가기

Java/Java 알고리즘 모음

[Java 알고리즘] 2. Array 모음

반응형

 

 

https://cote.inflearn.com/contest/10/problem/02-01

 

OnlineJudge

 

cote.inflearn.com

https://and-some.tistory.com/529

 

[Ch.02 - Array] 01. 큰 수 출력하기

1. 큰 수 출력하기 설명 N개의 정수를 입력받아, 자신의 바로 앞 수보다 큰 수만 출력하는 프로그램을 작성하세요. (첫 번째 수는 무조건 출력한다) 입력 첫 줄에 자연수 N(1

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-02

https://and-some.tistory.com/530

 

[Ch.02 - Array] 02. 보이는 학생

2. 보이는 학생 설명 선생님이 N명의 학생을 일렬로 세웠습니다. 일렬로 서 있는 학생의 키가 앞에서부터 순서대로 주어질 때, 맨 앞에 서 있는 선생님이 볼 수 있는 학생의 수를 구하는 프로그램

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-03

https://and-some.tistory.com/531

 

[Ch.02 - Array] 03. 가위 바위 보

3. 가위 바위 보 설명 A, B 두 사람이 가위바위보 게임을 합니다. 총 N번의 게임을 하여 A가 이기면 A를 출력하고, B가 이기면 B를 출력합니다. 비길 경우에는 D를 출력합니다. 가위, 바위, 보의 정보

and-some.tistory.com

 

https://cote.inflearn.com/contest/10/problem/02-04

https://and-some.tistory.com/532

 

[Ch.02 - Array] 04. 피보나치 수열

4. 피보나치 수열 설명 1) 피보나키 수열을 출력한다. 피보나치 수열이란 앞의 2개의 수를 합하여 다음 숫자가 되는 수열이다. 2) 입력은 피보나치 수열의 총 항의 수 이다. 만약 7이 입력되면 1 1 2

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-05

https://and-some.tistory.com/533

 

[Ch.02 - Array] 05. 소수(에라토스테네스 체) #

5. 소수(에라토스테네스 체) 설명 자연수 N이 입력되면 1부터 N까지의 소수의 개수를 출력하는 프로그램을 작성하세요. 만약 20이 입력되면 1부터 20까지의 소수는 2, 3, 5, 7, 11, 13, 17, 19로 총 8개입

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-06

https://and-some.tistory.com/534

 

[Ch.02 - Array] 06. 뒤집은 소수

6. 뒤집은 소수 설명 N개의 자연수가 입력되면 각 자연수를 뒤집은 후 그 뒤집은 수가 소수이면 그 소수를 출력하는 프로그램을 작성하세요. 예를 들어 32를 뒤집으면 23이고, 23은 소수이다. 그러

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-07

https://and-some.tistory.com/535

 

[Ch.02 - Array] 07. 점수계산

7. 점수계산 설명 OX 문제는 맞거나 틀린 두 경우의 답을 가지는 문제를 말한다. 여러 개의 OX 문제로 만들어진 시험에서 연속적으로 답을 맞히는 경우에는 가산점을 주기 위해서 다음과 같이 점

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-08

https://and-some.tistory.com/536

 

[Ch.02 - Array] 08. 등수 구하기 [+동일 점수 높은 등수]

8. 등수구하기 설명 N명의 학생의 국어점수가 입력되면 각 학생의 등수를 입력된 순서대로 출력하는 프로그램을 작성하세요. 같은 점수가 입력될 경우 높은 등수로 동일 처리한다. 즉 가장 높은

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-09

https://and-some.tistory.com/537

 

[Ch.02 - Array] 09. 격자판 최대합 (+ list, Math.max) #

9. 격자판 최대합 설명 5*5 격자판에 아래롸 같이 숫자가 적혀있습니다. N*N의 격자판이 주어지면 각 행의 합, 각 열의 합, 두 대각선의 합 중 가 장 큰 합을 출력합니다. 입력 첫 줄에 자연수 N이 주

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-10

https://and-some.tistory.com/538

 

[Ch.02 - Array] 10. 봉우리

10. 봉우리 설명 지도 정보가 N*N 격자판에 주어집니다. 각 격자에는 그 지역의 높이가 쓰여있습니다. 각 격자판의 숫자 중 자신의 상하좌우 숫자보다 큰 숫자는 봉우리 지역입니다. 봉우리 지역

and-some.tistory.com

 

 

https://cote.inflearn.com/contest/10/problem/02-11

https://and-some.tistory.com/539

 

[Ch.02 - Array] 11. 임시반장 정하기

11. 임시반장 정하기 설명 김갑동 선생님은 올해 6학년 1반 담임을 맡게 되었다. 김갑동 선생님은 우선 임시로 반장을 정하고 학생들이 서로 친숙해진 후에 정식으로 선거를 통해 반장을 선출하

and-some.tistory.com

 

https://cote.inflearn.com/contest/10/problem/02-12

https://and-some.tistory.com/540

 

[Ch.02 - Array] 12. 멘토링

12. 멘토링 설명 현수네 반 선생님은 반 학생들의 수학점수를 향상시키기 위해 멘토링 시스템을 만들려고 합니다. 멘토링은 멘토(도와주는 학생)와 멘티(도움을 받는 학생)가 한 짝이 되어 멘토

and-some.tistory.com

 

 


https://leetcode.com/problems/two-sum/submissions/

 

Two Sum - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/894

 

[LeetCode- Ch3. 배열] 1. 두개 합

https://leetcode.com/problems/two-sum/submissions/ Two Sum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. 조건을 만족하는 단

and-some.tistory.com

 

 

https://leetcode.com/problems/daily-temperatures/submissions/

 

Daily Temperatures - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/895

 

[LeetCode- Ch3. 배열] 2. 일일 온도

https://leetcode.com/problems/daily-temperatures/submissions/ Daily Temperatures - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. 이중

and-some.tistory.com

 

 

https://leetcode.com/problems/maximum-subarray/submissions/

 

Maximum Subarray - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/896

 

[LeetCode- Ch3. 배열] 3. 부분배열 최댓값

https://leetcode.com/problems/maximum-subarray/submissions/ Maximum Subarray - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. DFS 이용

and-some.tistory.com

 

 

https://leetcode.com/problems/group-anagrams/

 

Group Anagrams - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/900

 

[LeetCode- Ch3. 배열] 4. 그룹 아나그램

https://leetcode.com/problems/group-anagrams/ Group Anagrams - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Map 자료구조를 만들어

and-some.tistory.com

 

 

https://leetcode.com/problems/trapping-rain-water/

 

Trapping Rain Water - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/897

 

[LeetCode- Ch3. 배열] 5. 빗물 담기 # [+ 분할과 정복]

https://leetcode.com/problems/trapping-rain-water/ Trapping Rain Water - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 해결 [Divi

and-some.tistory.com

 

https://www.lintcode.com/problem/641/

 

LintCode 炼码

 

www.lintcode.com

https://and-some.tistory.com/898

 

[LeetCode- Ch3. 배열] 6. 누락된 범위 #

https://www.lintcode.com/problem/641/ LintCode 炼码 www.lintcode.com 1. 예외처리 필수 2. 범위설정이 중요하다. -> 처음 / 중간 /끝 //배열이 존재하지 않을 때 list.add(makeRange(lower, upper)); //처음 list.add(makeRange(lower,

and-some.tistory.com

 

 

https://leetcode.com/problems/spiral-matrix/

 

Spiral Matrix - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/899

 

[LeetCode- Ch3. 배열] 7. 나선형 매트릭스 #

https://leetcode.com/problems/spiral-matrix/ Spiral Matrix - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 나선형 매트릭스 :m x n

and-some.tistory.com

 

 


 

https://leetcode.com/problems/reconstruct-a-2-row-binary-matrix/

 

Reconstruct a 2-Row Binary Matrix - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/925

 

[LeetCode- Part. 1] 2. 2행N열 재구성 (+ 2차원 배열 정렬)

https://leetcode.com/problems/reconstruct-a-2-row-binary-matrix/ Reconstruct a 2-Row Binary Matrix - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leet

and-some.tistory.com

 

 

https://leetcode.com/problems/pairs-of-songs-with-total-durations-divisible-by-60/

 

Pairs of Songs With Total Durations Divisible by 60 - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/926

 

[LeetCode- Part. 1] 3. 총길이 60초짜리 음악 쌍

https://leetcode.com/problems/pairs-of-songs-with-total-durations-divisible-by-60/ Pairs of Songs With Total Durations Divisible by 60 - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get pr

and-some.tistory.com

 

 

https://leetcode.com/problems/spiral-matrix-ii/submissions/

 

Spiral Matrix II - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

https://and-some.tistory.com/927

 

[LeetCode- Part. 1] 4. 나선형 매트릭스 생성

https://leetcode.com/problems/spiral-matrix-ii/submissions/ Spiral Matrix II - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 참고자료

and-some.tistory.com


 

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5PzOCKAigDFAUq&categoryId=AV5PzOCKAigDFAUq&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=2&pageSize=30&pageIndex=1 

 

SW Expert Academy

SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!

swexpertacademy.com

https://and-some.tistory.com/855

 

[SW 아카데미] 2001. 파리 퇴치 #

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5PzOCKAigDFAUq&categoryId=AV5PzOCKAigDFAUq&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=2&pageSize=30&pageIndex=1 SW Exper

and-some.tistory.com

 

 

https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV7GLXqKAWYDFAXB&categoryId=AV7GLXqKAWYDFAXB&categoryType=CODE&problemTitle=%EB%86%8D%EC%9E%91%EB%AC%BC&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=&pageSize=10&pageIndex=1 

 

SW Expert Academy

SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!

swexpertacademy.com

https://and-some.tistory.com/856

 

[SW 아카데미] 2805. 농작물 수확하기 #

https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV7GLXqKAWYDFAXB&categoryId=AV7GLXqKAWYDFAXB&categoryType=CODE&problemTitle=%EB%86%8D%EC%9E%91%EB%AC%BC&orderBy=FIRST_REG_DATETIME&selectCodeLang=ALL&select-1=&pageSize=10&pageInd

and-some.tistory.com

 

 

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV7GKs06AU0DFAXB&categoryId=AV7GKs06AU0DFAXB&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=30&pageIndex=1 

 

SW Expert Academy

SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!

swexpertacademy.com

https://and-some.tistory.com/875

 

[SW 아카데미] 1940. N-Queen #

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV7GKs06AU0DFAXB&categoryId=AV7GKs06AU0DFAXB&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=30&pageIndex=1 SW Exper

and-some.tistory.com

 

 

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV2b-QGqADMBBASw&categoryId=AV2b-QGqADMBBASw&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=30&pageIndex=1 

 

SW Expert Academy

SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!

swexpertacademy.com

https://and-some.tistory.com/879

 

[SW 아카데미] 1493. 새로운 수의 연산 #

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV2b-QGqADMBBASw&categoryId=AV2b-QGqADMBBASw&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=30&pageIndex=1 SW Exper

and-some.tistory.com

 

반응형