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 amound of water a container can store.Notice that you may not slant the container.κ·Έλ¦Όμ 보면 μ½κ² μ΄ν΄κ° κ°λ₯νλ€. slant (κΈ°..
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. νμ΄ 1: λΈλ£¨νΈ ν¬μ€ - μκ° μ΄κ³Όclass Solution: def threeSum(self, nums: List[int]) -> List[List[int]]: res = set() nums.sort() for i in range(len(nums)): ..
Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index1] and numbers[index2] where 1 Return the indices of the two numbers, index1 and index2, added by one as an integer array [index1, index2] of length 2.The tests are generated such that there is exactl..
A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers.Given a string s, return true if it is a palindrome, or false otherwise.μ ν¨ν palindrome(νλ¬Έ) κ²μ¬νλ λ©μλ ꡬννκΈ°! νμ΄1: Reverse Stringclass Solution: def isPalindrome(self, s:..