Python
[LeetCode] 402. Remove K Digits (Daily Question)
문제 Given string num representing a non-negative integer num, and an integer k, return the smallest possible integer after removing k digits from num. 숫자 문자열 num에서 k개의 digit(0-9)을 없애서 가장 작은 수를 만드는 문제이다. Example 1: Input: num = "1432219", k = 3 Output: "1219" Explanation: Remove the three digits 4, 3, and 2 to form the new number 1219 which is the smallest. Example 2: Input: num = "10200", k = 1 O..
[LeetCode] 950. Reveal Cards In Increasing Order (Daily Question)
문제 You are given an integer array deck. There is a deck of cards where every card has a unique integer. The integer on the ith card is deck[i]. You can order the deck in any order you want. Initially, all the cards start face down (unrevealed) in one deck. You will do the following steps repeatedly until all cards are revealed: - Take the top card of the deck, reveal it, and take it out of the d..
[LeetCode] 1249. Minimum Remove to Make Valid Parentheses (Daily Question)
문제 Given a string s of '(' , ')' and lowercase English characters. Your task is to remove the minimum number of parentheses ( '(' or ')', in any positions ) so that the resulting parentheses string is valid and return any valid string. Formally, a parentheses string is valid if and only if: - It is the empty string, contains only lowercase characters, or - It can be written as AB (A concatenated..