목록코딩공부/리트코드 (6)
심플하게 개발하기

리트코드 11번 문제. 난이도: Medium 리트코드 링크 https://leetcode.com/problems/container-with-most-water/description/ 문제 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 (i, height[i]). Find two lines that together with the x-axis form a container, such that the container contains the most water. Return the maximum amo..

리트코드 22번 문제. 난이도: Medium 문제 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. 1
리트코드 20번 문제. 난이도: Easy 문제 Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Every close bracket has a corresponding open bracket of the same type. 괄호만으로 이루어진 string이 valid 한 지를 리턴하는 문제이다. ..
리트코드 5번 문제. 난이도: Medium 문제 Given a string s, return the longest palindromic substring in s. A string is called a palindrome string if the reverse of that string is the same as the original string. 주어진 string에서 가장 긴 palindrome을 찾아야 한다. palindrome은 string을 거꾸로 해도 같은 string이 되는 경우를 말한다. 예시 Example 1 Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid answer. Example 2: Input: s = "c..

리트코드 15번 문제. 난이도: Medium 문제 Given an integer array nums, return all the triplets [nums [i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets. 예시 Example 1 Input: nums = [-1,0,1,2,-1,-4] Output: [[-1,-1,2],[-1,0,1]] Explanation: nums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0. nums[1] + nu..
리트코드 7번 문제. 난이도: Medium 문제 Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. Assume the environment does not allow you to store 64-bit integers (signed or unsigned). 예시 Example 1: Input: x = 123 Output: 321 Example 2: Input: x = -123 Output: -321 Example 3: Input: x = 1..