본문 바로가기

알고리즘/LeetCode

(6)
[JAVA] LeetCode - 3Sum Closest - 16 문제내용 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 Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the three integers. Y..
[JAVA] LeetCode - Container With Most Water - 11 문제내용 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 You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (..
[JAVA] LeetCode - Zigzag Conversion - 6 문제내용 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 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better..
[JAVA] LeetCode - Trim a Binary Search Tree - 669 문제내용 https://leetcode.com/problems/trim-a-binary-search-tree/ Trim a Binary Search Tree - 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 Given the root of a binary search tree and the lowest and highest boundaries as low and high, trim the tree so that all its elements lies in [lo..
[JAVA] LeetCode - Spiral Matrix II - 59 문제내용 https://leetcode.com/problems/spiral-matrix-ii/ 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 Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: Input: n = 3 Output: [[1,2,3],[8,9,4],[7,6,5]] ..
[JAVA] LeetCode - Game of Life - 289 문제내용 https://leetcode.com/problems/game-of-life/submissions/ Game of Life - 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 According to Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conwa..