목록LeetCode (568)
넘치게 채우기
https://leetcode.com/problems/lexicographical-numbers/description/?envType=daily-question&envId=2024-09-21leetcode - Lexicographical Numbers문제 유형 : 수학, 구현, dfs, 재귀문제 난이도 : Medium 문제Given an integer n, return all the numbers in the range [1, n] sorted in lexicographical order.You must write an algorithm that runs in O(n) time and uses O(1) extra space. 정수 n이 주어진다. [1, n]의 모든 숫자들을 사전순으로 정렬하여 반환하시..
https://leetcode.com/problems/shortest-palindrome/description/?envType=daily-question&envId=2024-09-20leetcode - Shortest Palindrome문제 유형 : 팰린드롬, 문자열 처리, KMP 알고리즘문제 난이도 : Hard 문제You are given a string s. You can convert s to a palindrome by adding characters in front of it.Return the shortest palindrome you can find by performing this transformation. 문자열 s를 받는다. 당신은 s에 접두사를 붙여서 변환시킬 수 있다.s에 문자를 ..
https://leetcode.com/problems/different-ways-to-add-parentheses/description/?envType=daily-question&envId=2024-09-19leetcode - Different Ways to Add Parentheses문제 유형 : 문자열 처리, 재귀, 다이나믹 프로그래밍, 카탈란 수문제 난이도 : Medium 문제Given a string expression of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. You may return the answe..
https://leetcode.com/problems/largest-number/description/?envType=daily-question&envId=2024-09-18leetcode - Largest Number문제 유형 : 문자열 처리, 정렬문제 난이도 : Medium 문제Given 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. 음이 아닌 정수 nums를 받는다. 이 수들을 나열하여 만들 수 있는 가..
https://leetcode.com/problems/uncommon-words-from-two-sentences/description/?envType=daily-question&envId=2024-09-17leetcode - Uncommon Words from Two Sentences문제 유형 : 문자열 처리, 해시문제 난이도 : Easy 문제A sentence is a string of single-space separated words where each word consists only of lowercase letters.A word is uncommon if it appears exactly once in one of the sentences, and does not appear in the ..
https://leetcode.com/problems/minimum-time-difference/description/?envType=daily-question&envId=2024-09-16leetcode - Minimum Time DIfference문제 유형 : 정렬, 문자열 처리문제 난이도 : Medium 문제Given a list of 24-hour clock time points in "HH:MM" format, return the minimum minutes difference between any two time-points in the list. "HH:MM"의 형식으로 24시간기준의 시간이 배열로 주어진다.두 시간의 최소 시간차를 분단위의 정수로 구하시오. 풀이우선, 모든 시간을 분단위로 ..
https://leetcode.com/problems/find-the-longest-substring-containing-vowels-in-even-counts/description/?envType=daily-question&envId=2024-09-15leetcode - Fine the Longest Substring Containing Vowels in Even Counts문제 유형 : 비트마스크, 비트 연산, 슬라이딩 윈도우문제 난이도 : Medium 문제Given the string s, return the size of the longest substring containing each vowel an even number of times. That is, 'a', 'e', 'i', 'o', a..
https://leetcode.com/problems/longest-subarray-with-maximum-bitwise-and/description/?envType=daily-question&envId=2024-09-14leetcode - Longest Subarray With Maximum Bitwise AND문제 유형 : 비트 연산, 비트마스킹, 슬라이딩 윈도우문제 난이도 : Medium 문제You are given an integer array nums of size n.Consider a non-empty subarray from nums that has the maximum possible bitwise AND.In other words, let k be the maximum value of ..
https://leetcode.com/problems/xor-queries-of-a-subarray/description/?envType=daily-question&envId=2024-09-13leetcode - XOR Queries of a Subarray문제 유형 : 비트마스킹, 부분합문제 난이도 : Medium 문제You are given an array arr of positive integers. You are also given the array queries where queries[i] = [lefti, righti].For each query i compute the XOR of elements from lefti to righti (that is, arr[lefti] XOR arr[le..
https://leetcode.com/problems/count-the-number-of-consistent-strings/description/?envType=daily-question&envId=2024-09-12leetcode - Count the Number of Consistent Strings문제 유형 : 문자열 처리문제 난이도 : Easy 문제You are given a string allowed consisting of distinct characters and an array of strings words. A string is consistent if all characters in the string appear in the string allowed.Return the number ..