Major- (865) 썸네일형 리스트형 [LeetCode- Part. 2] 4. 가장 긴 회문 부분 문자열 (+ 2차원 DP) # https://leetcode.com/problems/longest-palindromic-substring/submissions/ 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 (1) 이중 for문 이용 : 타임 리밋 발생 class Solution { public String longestPalindrome(String s) { int cnt=Integer.MIN_VALUE; String answer=".. [LeetCode- Part. 2] 3. 두 단어 이상 연결된 단어 # https://leetcode.com/problems/concatenated-words/submissions/ Concatenated Words - 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/928 [LeetCode- Part. 1] 5. 단어 나누기 # https://leetcode.com/problems/word-break/ Word Break - LeetCode Level up your co.. [LeetCode- Part. 2] 2. 트럭의 실을 수 있는 최대단위 https://leetcode.com/problems/maximum-units-on-a-truck/ Maximum Units on a Truck - 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 트럭 한 대에 상자를 넣는 2차원 배열 boxTypes[i] = [numberOfBoxes, numberOfUnitsPerBox] 트럭에 실을 수 있는 상자 truckSize가 주어지면 truckSize를 초과하지 않는 한 트럭에 넣을 상자를 선택해, 트럭에 실을 수있는.. [LeetCode- Part. 2] 1. 원 안에서 로봇 # (+ toCharArray) https://leetcode.com/problems/robot-bounded-in-circle/ Robot Bounded In Circle - 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 로봇이 원을 그리는지 확인 로봇은 처음(0, 0) 북쪽을 향한다. 로봇은 세 가지 명령 수행 가능 "G": 1 단위 직진 "L": 왼쪽으로 90도 회전 "R": 오른쪽으로 90도 회전 로봇은 주어짂 것을 순서대로 수행하면서 무한반복 로봇이 평면에 원을 그리는 경우 true를.. [LeetCode- Part. 1] 7. 금광 찾기 # https://leetcode.com/problems/path-with-maximum-gold/submissions/ Path with Maximum Gold - 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. 위치한 셀에서 모든 금을 가질 수 있다 2. 자신의 위치에서 왼쪽, 오른쪽, 위, 아래로 한칸 이동 가능. 3. 같은 셀을 두 번 이상 방문 할 수 없다 4. 0이 있는 셀은 방문할 수 없다 5. 모든 위치에서 금 수집을 시작하고 중지 .. [LeetCode- Part. 1] 6. 최소 경로 합 # https://leetcode.com/problems/minimum-path-sum/ Minimum Path 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) DFS - 맵 public class Solution { public int minPathSum(int[][] grid) { Map visited = new HashMap.. [LeetCode- Part. 1] 5. 단어 나누기 # (+DP) https://leetcode.com/problems/word-break/ Word Break - 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 문자 s와 문자열 리스트 wordDict이 주어지면, wordDict에 있는 단어로 모두 분리되면 true 리턴 여러번 재사용 가능 DP 이용 1차시도 -> 실패 import java.util.*; class Solution { public boolean wordBreak(String s, List wordDict) {.. [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 참고자료 https://and-some.tistory.com/899 [LeetCode- Ch3. 배열] 7. 나선형 매트릭스 # https://leetcode.com/problems/spiral-matrix/ Spiral Matrix - LeetCode Level up your.. 이전 1 ··· 20 21 22 23 24 25 26 ··· 109 다음 목록 더보기