leetcode73 [LeetCode][Kotlin] 680. Valid Palindrome II 680. Valid Palindrome IIGiven a string s, return true if the s can be palindrome after deleting at most one character from it.문자열 s가 주어지면, 최대 한 문자를 삭제한 후 s가 회문일 수 있으면 true를 반환합니다. Example 1:Input: s = "aba"Output: true Example 2:Input: s = "abca"Output: trueExplanation: You could delete the character 'c'. Example 3:Input: s = "abc"Output: false Constraints:1 s consists of lowercase English lette.. 2024. 9. 30. [LeetCode][Kotlin] 799. Champagne Tower 799. Champagne TowerWe stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the 100th row. Each glass holds one cup of champagne. Then, some champagne is poured into the first glass at the top. When the topmost glass is full, any excess liquid poured will fall equally to the glass immediately to the left and right of it. When those glasses.. 2024. 9. 25. [LeetCode][Kotlin] 2610. Convert an Array Into a 2D Array With Conditions 2610. Convert an Array Into a 2D Array With ConditionsYou are given an integer array nums. You need to create a 2D array from nums satisfying the following conditions:The 2D array should contain only the elements of the array nums.Each row in the 2D array contains distinct integers.The number of rows in the 2D array should be minimal.Return the resulting array. If there are multiple answers, ret.. 2024. 9. 25. [LeetCode][Kotlin] 68. Text Justification 68. Text JustificationGiven an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justified. You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad extra spaces ' ' when necessary so that each line has exactly maxWidth characters. Extra spaces between wor.. 2024. 9. 23. [LeetCode][Kotlin] 1291. Sequential Digits 1291. Sequential DigitsAn integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers in the range [low, high] inclusive that have sequential digits.정수는 숫자의 각 숫자가 이전 숫자보다 하나 더 큰 경우에만 연속 숫자를 갖습니다. 연속 숫자가 있는 [낮음, 높음] 범위(포함)의 모든 정수의 정렬된 목록을 반환합니다. Example 1:Input: low = 100, high = 300Output: [123,234] Example 2.. 2024. 9. 5. [LeetCode][Kotlin] 2870. Minimum Number of Operations to Make Array Empty 2870. Minimum Number of Operations to Make Array EmptyYou are given a 0-indexed array nums consisting of positive integers.There are two types of operations that you can apply on the array any number of times:Choose two elements with equal values and delete them from the array.Choose three elements with equal values and delete them from the array.Return the minimum number of operations required .. 2024. 9. 5. [LeetCode][Kotlin] 179. Largest Number 179. Largest NumberGiven a list of non-negative integers nums, arrange them such that they form the largest number and return it.Since the result may be very large, so you need to return a string instead of an integer.음수가 아닌 정수 숫자 목록이 주어지면 가장 큰 숫자를 형성하도록 배열하여 반환합니다. 결과가 매우 클 수 있으므로 정수 대신 문자열을 반환해야 합니다. Example 1:Input: nums = [10,2]Output: "210" Example 2:Input: nums = [3,30,34,5,9]Output: "9534.. 2024. 8. 30. 이전 1 ··· 5 6 7 8 9 10 11 다음