995. Minimum Number of K Consecutive Bit Flips
You are given a binary array nums and an integer k. A k-bit flip is choosing a subarray of length k from nums and simultaneously changing every 0 in the subarray to 1, and […]
You are given a binary array nums and an integer k. A k-bit flip is choosing a subarray of length k from nums and simultaneously changing every 0 in the subarray to 1, and […]
Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap
Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums. You must implement an algorithm that runs in O(n) time and
Given the head of a linked list, remove the nth node from the end of the list and return its head. Example 1: Input:
Given an array of integers nums and an integer limit, return the size of the longest non-empty subarray such that the absolute difference between any
Given an array of integers nums and an integer k. A continuous subarray is called nice if there are k odd numbers on it. Return the number of nice sub-arrays.
There is a bookstore owner that has a store open for n minutes. Every minute, some number of customers enter the store.
In the universe Earth C-137, Rick discovered a special form of magnetic force between two balls if they are put
You are given an integer array bloomDay, an integer m and an integer k. You want to make m bouquets. To make a bouquet, you need
You have n jobs and m workers. You are given three arrays: difficulty, profit, and worker where: difficulty[i] and profit[i] are the difficulty and the profit of the ith job, and worker[j] is the
Given a non-negative integer c, decide whether there’re two integers a and b such that a2 + b2 = c.Example 1: Input: c = 5 Output: true Explanation: