목록LeetCode (568)
넘치게 채우기
https://leetcode.com/problems/check-if-array-pairs-are-divisible-by-k/description/?envType=daily-question&envId=2024-10-01leetcode - Check If Array Pairs Are Divisible by K문제 유형 : 수학문제 난이도 : Medium 문제Given an array of integers arr of even length n and an integer k.We want to divide the array into exactly n / 2 pairs such that the sum of each pair is divisible by k.Return true If you can find a w..
https://leetcode.com/problems/design-a-stack-with-increment-operation/description/?envType=daily-question&envId=2024-09-30leetcode - Design a Stack With Increment Operation문제 유형 : 구현, 스택문제 난이도 : Medium 문제Design a stack that supports increment operations on its elements.Implement the CustomStack class:CustomStack(int maxSize) Initializes the object with maxSize which is the maximum number of elem..
https://leetcode.com/problems/all-oone-data-structure/description/?envType=daily-question&envId=2024-09-29leetcode - All O'one Data Structure문제 유형 : 해시, 구현문제 난이도 : Hard 문제Design a data structure to store the strings' count with the ability to return the strings with minimum and maximum counts.Implement the AllOne class:AllOne() Initializes the object of the data structure.inc(String key) Increme..
https://leetcode.com/problems/design-circular-deque/description/?envType=daily-question&envId=2024-09-28leetcode - Design Circular Deque문제 유형 : 데크, 큐, 스택, 구현문제 난이도 : Medium 문제Design your implementation of the circular double-ended queue (deque).Implement the MyCircularDeque class:MyCircularDeque(int k) Initializes the deque with a maximum size of k.boolean insertFront() Adds an item at the front..
https://leetcode.com/problems/my-calendar-ii/description/?envType=daily-question&envId=2024-09-27leetcode - My Calendar II문제 유형 : 구현, 라인 스위핑문제 난이도 : Medium 문제You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a triple booking.A triple booking happens when three events have some non-empty intersection (i.e., some moment is common to a..
https://leetcode.com/problems/my-calendar-i/description/?envType=daily-question&envId=2024-09-26leetcode - My Calendar I문제 유형 : 구현, 이진 탐색문제 난이도 : Medium 문제You are implementing a program to use as your calendar. We can add a new event if adding the event will not cause a double booking.A double booking happens when two events have some non-empty intersection (i.e., some moment is common to both e..
https://leetcode.com/problems/sum-of-prefix-scores-of-strings/description/?envType=daily-question&envId=2024-09-25leetcode - Sum of Prefix Scores of Strings문제 유형 : 트라이(Trie), 구현문제 난이도 : Hard 문제You are given an array words of size n consisting of non-empty strings.We define the score of a string word as the number of strings words[i] such that word is a prefix of words[i].For example, if words = ..
https://leetcode.com/problems/find-the-length-of-the-longest-common-prefix/description/?envType=daily-question&envId=2024-09-24leetcode - Find the Length of the Longest Common Prefix문제 유형 : 트라이(Trie), 문자열 처리, 해시문제 난이도 : Medium 문제You are given two arrays with positive integers arr1 and arr2.A prefix of a positive integer is an integer formed by one or more of its digits, starting from its leftmos..
https://leetcode.com/problems/extra-characters-in-a-string/description/?envType=daily-question&envId=2024-09-23leetcode - Extra Characters in a String문제 유형 : 문자열 처리, 재귀, dp문제 난이도 : Medium 문제You are given a 0-indexed string s and a dictionary of words dictionary. You have to break s into one or more non-overlapping substrings such that each substring is present in dictionary. There may be some ex..
https://leetcode.com/problems/k-th-smallest-in-lexicographical-order/description/?envType=daily-question&envId=2024-09-22leetcode - K-th Smallest in Lexicographical Order문제 유형 : 트리, dfs, 수학문제 난이도 : Hard 문제Given two integers n and k, return the kth lexicographically smallest integer in the range [1, n]. 두 개의 정수 n과 k가 주어진다. 범위 [1,n]에서 사전순으로 k번째로 작은 정수를 반환하시오. 풀이순차적으로 k개를 찾는 것은 느리다.대신, 점프를 할 필요가 있다..