leetcode
![[LeetCode] 85. Maximal Rectangle (Daily Question)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FuzLig%2FbtsGCp5fcCZ%2F75FljyMq4cspvioe89gD31%2Fimg.png)
[LeetCode] 85. Maximal Rectangle (Daily Question)
문제 Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. 0과 1로 이루어진 테이블이 주어졌을 때, 1로 만들 수 있는 가장 큰 사각형의 넓이를 구하는 문제이다. Example 1: Input: matrix = [["1","0","1","0","0"],["1","0","1","1","1"],["1","1","1","1","1"],["1","0","0","1","0"]] Output: 6 Explanation: The maximal rectangle is shown in the above picture. Example 2: Input..
![[LeetCode] 42. Trapping Rain Water (Daily Question)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FccyHwq%2FbtsGw8jjqw5%2FeKKYifZKk0QpB4kKRPctV0%2Fimg.png)
[LeetCode] 42. Trapping Rain Water (Daily Question)
문제 Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. 다양한 높이의 기둥들이 주어진다. 이 때 비가오게 된다면 차게 될 물의 양을 구하는 문제이다. Example 1: Input: height = [0,1,0,2,1,0,1,3,2,1,2,1] Output: 6 Explanation: The above elevation map (black section) is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain w..
[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] 2073. Time Needed to Buy Tickets (Daily Question)
문제 There are n people in a line queuing to buy tickets, where the 0th person is at the front of the line and the (n - 1)th person is at the back of the line. You are given a 0-indexed integer array tickets of length n where the number of tickets that the ith person would like to buy is tickets[i]. Each person takes exactly 1 second to buy a ticket. A person can only buy 1 ticket at a time and ha..
[LeetCode] 678. Valid Parenthesis String (Daily Question)
문제 Given a string s containing only three types of characters: '(', ')' and '*', return true if s is valid. The following rules define a valid string: - Any left parenthesis '(' must have a corresponding right parenthesis ')'. - Any right parenthesis ')' must have a corresponding left parenthesis '('. - Left parenthesis '(' must go before the corresponding right parenthesis ')'.'*' - could be tr..