- Today
- Total
목록전체 글 (384)
작심삼일
문제 링크: https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/ 문제 On a 2D plane, we place n stones at some integer coordinate points. Each coordinate point may have at most one stone. A stone can be removed if it shares either the same row or the same column as another stone that has not been removed. Given an array stones of length n where stones[i] = [xi, yi] represents the ..
문제 링크: https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/ 문제 You are given a string s consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them. We repeatedly make duplicate removals on s until we no longer can. Return the final string after all such duplicate removals have been made. It can be proven t..
문제 링크: https://leetcode.com/problems/online-stock-span/ 문제 Design an algorithm that collects daily price quotes for some stock and returns the span of that stock's price for the current day. The span of the stock's price today is defined as the maximum number of consecutive days (starting from today and going backward) for which the stock price was less than or equal to today's price. For exampl..
문제 링크: https://leetcode.com/problems/make-the-string-great/ 문제 Given a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where: 0
문제 링크: https://leetcode.com/problems/maximum-69-number/ 문제 You are given a positive integer num consisting only of digits 6 and 9. Return the maximum number you can get by changing at most one digit (6 becomes 9, and 9 becomes 6). 조건 1
문제 링크: https://leetcode.com/problems/longest-palindrome-by-concatenating-two-letter-words/ 문제 You are given an array of strings words. Each element of words consists of two lowercase English letters. Create the longest possible palindrome by selecting some elements from words and concatenating them in any order. Each element can be selected at most once. Return the length of the longest palindro..
문제 링크: https://leetcode.com/problems/minimum-genetic-mutation/ 문제 A gene string can be represented by an 8-character long string, with choices from 'A', 'C', 'G', and 'T'. Suppose we need to investigate a mutation from a gene string start to a gene string end where one mutation is defined as one single character changed in the gene string. For example, "AACCGGTT" --> "AACCGGTA" is one mutation. ..
문제 링크: https://leetcode.com/problems/toeplitz-matrix/ 문제 Given an m x n matrix, return true if the matrix is Toeplitz. Otherwise, return false. A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same elements. 조건 m == matrix.length n == matrix[i].length 1