분류 전체보기
-
Leetcode 2114. Maximum Number of Words Found in Sentences개발/Leetcode 2023. 7. 2. 10:54
https://leetcode.com/problems/maximum-number-of-words-found-in-sentences/description/ Maximum Number of Words Found in Sentences - LeetCode Can you solve this real interview question? Maximum Number of Words Found in Sentences - A sentence is a list of words that are separated by a single space with no leading or trailing spaces. You are given an array of strings sentences, where each sentenc le..
-
Leetcode 1678. Goal Parser Interpretation개발/Leetcode 2023. 7. 2. 10:45
https://leetcode.com/problems/goal-parser-interpretation/description/ 문제 당신은 주어지는 command를 해석하는 Goal Parser의 주인이다. command는 "G", "()" 그리고 "(al)"로 이루어져 있다. Goal Parer는 "G"는 "G" 그대로 해석하고, "()"는 "o"로 해석한다. 마지막으로 "(al)"은 "al"로 해석한다. 주어진 command를 위와같이 해석하여 반환하여라 코드 import re class Solution: def interpret(self, command: str) -> str: # () parse answer = "" answer = re.sub(r'\(\)', 'o', command) # (al) ..
-
Leetcode 744. Find Smallest Letter Greater Than Target개발/Leetcode 2023. 7. 2. 10:38
https://leetcode.com/problems/find-smallest-letter-greater-than-target/description/ Find Smallest Letter Greater Than Target - LeetCode Can you solve this real interview question? Find Smallest Letter Greater Than Target - You are given an array of characters letters that is sorted in non-decreasing order, and a character target. There are at least two different characters in letters. Retu leetc..
-
Leetcode 2011. Final Value of Variable After Performing Operations개발/Leetcode 2023. 7. 2. 10:33
https://leetcode.com/problems/final-value-of-variable-after-performing-operations/description/ Final Value of Variable After Performing Operations - LeetCode Can you solve this real interview question? Final Value of Variable After Performing Operations - There is a programming language with only four operations and one variable X: * ++X and X++ increments the value of the variable X by 1. * --X..
-
Leetcode 43. Multiply Strings개발/Leetcode 2023. 7. 1. 11:36
https://leetcode.com/problems/multiply-strings/description/ Multiply Strings - LeetCode Can you solve this real interview question? Multiply Strings - Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Note: You must not use any built-in BigInteger library leetcode.com 문제 양의 정수인 num1과 num2가 주어지며 이 숫자들은 문자열로 표현되..
-
Leetcode 22. Generate Parentheses개발/Leetcode 2023. 7. 1. 10:36
https://leetcode.com/problems/generate-parentheses/description/ Generate Parentheses - LeetCode Can you solve this real interview question? Generate Parentheses - Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Example 1: Input: n = 3 Output: ["((()))","(()())","(())()","()(())","()()()"] Exa leetcode.com 문제 n개의 괄호 짝으로 만들 수 있는 모든 괄호을 반환하여라 ..
-
Leetcode 2744. Find Maximum Number of String Pairs개발/Leetcode 2023. 7. 1. 09:59
https://leetcode.com/problems/find-maximum-number-of-string-pairs/description/ Find Maximum Number of String Pairs - LeetCode Can you solve this real interview question? Find Maximum Number of String Pairs - You are given a 0-indexed array words consisting of distinct strings. The string words[i] can be paired with the string words[j] if: * The string words[i] is equal to the rev leetcode.com 문제..
-
Leetcode 2305. Fair Distribution of Cookies개발/Leetcode 2023. 7. 1. 09:48
https://leetcode.com/problems/fair-distribution-of-cookies/description/ Fair Distribution of Cookies - LeetCode Can you solve this real interview question? Fair Distribution of Cookies - You are given an integer array cookies, where cookies[i] denotes the number of cookies in the ith bag. You are also given an integer k that denotes the number of children to distrib leetcode.com 문제 정수로 이루어진 배열 c..