문제 https://leetcode.com/problems/3sum-closest/ 3Sum Closest - 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 풀이코드 package SITE03_leetcode.medium; import java.util.*; /** * https://leetcode.com/problems/integer-to-roman/ */ public class M010_leetCode16_3Sum_Closet_풀이 { public stati..
문제 https://leetcode.com/problems/3sum/ 3Sum - 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 문제풀이 (DFS 사용한 코드 실패: 시간초과) package SITE03_leetcode.medium; import java.util.*; /** * https://leetcode.com/problems/3Sum/ */ public class M009_leetCode15_3Sum_시간초과 { static List list = new ..
문제 https://leetcode.com/problems/integer-to-roman/ Integer to Roman - 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 풀이코드 package SITE03_leetcode.medium; import java.util.*; import java.util.stream.Collectors; /** * https://leetcode.com/problems/integer-to-roman/ */ public class M..
문제 https://leetcode.com/problems/container-with-most-water/ Container With Most 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 풀이코드 package SITE03_leetcode.medium; import java.util.Arrays; /** * https://leetcode.com/problems/zigzag-conversion/ */ public class M007_leetCode..
문제 https://leetcode.com/problems/reverse-integer Reverse Integer - 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 풀이코드 class Solution { public int reverse(int x) { long result = 0; // int) 1534236469 잘못된 결과 while (x != 0) { // X 가 0이라면 마지막까지 계산 종료 int target = x; target = x % 10; ..
문제 https://leetcode.com/problems/zigzag-conversion ZigZag Conversion - 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 풀이코드 package SITE03_leetcode.medium; import java.util.Arrays; /** * https://leetcode.com/problems/zigzag-conversion/ */ public class M006_leetCode6_ZigZagConversio..
문제 https://leetcode.com/problems/median-of-two-sorted-arrays Median of Two Sorted Arrays - 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 풀이코드 package SITE03_leetcode.medium; import java.util.Arrays; /** * https://leetcode.com/problems/median-of-two-sorted-arrays */ public class M..
문제 https://leetcode.com/problems/longest-palindromic-substring Longest Palindromic Substring - 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 풀이코드 package SITE03_leetcode.medium; /** * https://leetcode.com/problems/longest-palindromic-substring/ */ public class M003_leetCode5_Long..
문제 https://leetcode.com/problems/longest-substring-without-repeating-characters Longest Substring Without Repeating Characters - 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 풀이코드 import java.util.*; /** * https://leetcode.com/problems/longest-substring-without-repeating-characte..
문제 https://leetcode.com/problems/add-two-numbers/ Add Two Numbers - 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 풀이코드 package Medium; /** * https://leetcode.com/problems/add-two-numbers/ */ public class M001_addTwoNumbers_SUCCESS { ListNode resultNode = new ListNode(); public st..
문제 https://www.acmicpc.net/problem/16198 16198번: 에너지 모으기 N개의 에너지 구슬이 일렬로 놓여져 있고, 에너지 구슬을 이용해서 에너지를 모으려고 한다. i번째 에너지 구슬의 무게는 Wi이고, 에너지를 모으는 방법은 다음과 같으며, 반복해서 사용할 수 있 www.acmicpc.net 풀이코드(실패) package seohae.algorithm.level2; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Scanner; /** * https://www.acmicpc.net/problem/15658 */ public class Problem_01..
문제 https://programmers.co.kr/learn/courses/30/lessons/12936 코딩테스트 연습 - 줄 서는 방법 n명의 사람이 일렬로 줄을 서고 있습니다. n명의 사람들에게는 각각 1번부터 n번까지 번호가 매겨져 있습니다. n명이 사람을 줄을 서는 방법은 여러가지 방법이 있습니다. 예를 들어서 3명의 사람 programmers.co.kr 풀이코드 (메모리초과) package seohae.algorithm.level3; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * https://programmers.co.kr/learn/courses/30/lessons/12936 */ publ..