목록슬라이딩 윈도우 (24)
넘치게 채우기
https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-ii/description/?envType=daily-question&envId=2024-11-10leetcode - Shortest Subarray With OR at Least K II문제 유형: 비트마스킹, 슬라이딩 윈도우문제 난이도: Medium 문제You are given an array nums of non-negative integers and an integer k.An array is called special if the bitwise OR of all of its elements is at least k.Return the length of the shortest s..
https://leetcode.com/problems/find-if-array-can-be-sorted/?envType=daily-question&envId=2024-11-06leetcode - Find if Array Can Be Sorted문제 유형: 정렬, 비트마스킹, 슬라이딩 윈도우문제 난이도: Medium 문제You are given a 0-indexed array of positive integers nums.In one operation, you can swap any two adjacent elements if they have the same number of set bits. You are allowed to do this operation any number of times (incl..
https://leetcode.com/problems/minimum-total-distance-traveled/description/?envType=daily-question&envId=2024-10-31leetcode - Minimum Total Distance Traveled문제 유형: 다이나믹 프로그래밍, 슬라이딩 윈도우문제 난이도: Hard 문제There are some robots and factories on the X-axis. You are given an integer array robot where robot[i] is the position of the ith robot. You are also given a 2D integer array factory where factory[j] ..
https://leetcode.com/problems/permutation-in-string/description/?envType=daily-question&envId=2024-10-05leetcode - Permutation in String문제 유형 : 슬라이딩 윈도우, 해시문제 난이도 : Medium 문제Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise.In other words, return true if one of s1's permutations is the substring of s2. 두 문자열 s1과 s2가 주어진다.만약 s2가 s1의 순열을 포함한다면 true를, 아..
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/minimum-swaps-to-group-all-1s-together-ii/description/?envType=daily-question&envId=2024-08-02leetcode - Minimum Swaps to Group All 1's Together II문제 유형 : 슬라이딩 윈도우문제 난이도 : Medium 문제A swap is defined as taking two distinct positions in an array and swapping the values in them.A circular array is defined as an array where we consider the first element and the last ele..
https://leetcode.com/problems/maximum-score-from-removing-substrings/leetcode - Maximum Score From Removing Substrings문제 유형 : 그리디, 스택, 슬라이딩 윈도우 문제 난이도 : Medium 문제You are given a string s and two integers x and y. You can perform two types of operations any number of times. Remove substring "ab" and gain x points. For example, when removing "ab" from "cabxbae" it becomes "cxbae". Remove substring..
https://leetcode.com/problems/find-the-minimum-and-maximum-number-of-nodes-between-critical-points/description/leetcode - Find the Minimum and Maximum Number of Nodes Between Critical Points문제 유형 : 연결리스트, 슬라이딩 윈도우문제 난이도 : Medium 문제A critical point in a linked list is defined as either a local maxima or a local minima.A node is a local maxima if the current node has a value strictly greater than ..
https://leetcode.com/problems/minimum-difference-between-largest-and-smallest-value-in-three-moves/description/leetcode - Minimum Difference Between Largest and Smallest Value in Three Moves문제 유형 : 그리디, 정렬, 슬라이딩 윈도우문제 난이도 : Medium 문제You are given an integer array nums.In one move, you can choose one element of nums and change it to any value.Return the minimum difference between the largest and ..
https://leetcode.com/problems/compare-version-numbers/description/leetcode - Compare Version Numbers문제 유형 : 문자열 처리, 투 포인터, 슬라이딩 윈도우문제 난이도 : Medium 문제Given two version numbers, version1 and version2, compare them.Version numbers consist of one or more revisions joined by a dot '.'. Each revision consists of digits and may contain leading zeros. Every revision contains at least one character. Revi..