3097. Shortest Subarray With OR at Least K II
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. […]
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. […]
You are given two integers n and x. You have to construct an array of positive integers nums of size n where for every 0 <= i < n –
You are given a sorted array nums of n non-negative integers and an integer maximumBit. You want to perform the following query n times: Find a non-negative integer k <
The bitwise AND of an array nums is the bitwise AND of all integers in nums. For example, for nums = [1, 5, 3], the bitwise
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
You are given a 0-indexed binary string s having an even length. A string is beautiful if it’s possible to partition it into one or more
Given a string word, compress it using the following algorithm: Begin with an empty string comp. While word is not empty, use the following operation: Remove
Given two strings s and goal, return true if and only if s can become goal after some number of shifts on s. A shift on s consists of moving the leftmost character of s to the rightmost
A sentence is a list of words that are separated by a single space with no leading or trailing spaces. For example, “Hello World”, “HELLO”, “hello world
A fancy string is a string where no three consecutive characters are equal. Given a string s, delete the minimum possible number of characters from s to make it fancy. Return the
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
You may recall that an array arr is a mountain array if and only if: arr.length >= 3 There exists some index i (0-indexed) with 0 <