摘要:
Design a number container system that can do the following: Insert or Replace a number at the given index in the system. Return the smallest index for 阅读全文
摘要:
A 0-indexed array derived with length n is derived by computing the bitwise XOR (⊕) of adjacent values in a binary array original of length n. Specifi 阅读全文
摘要:
You are given an array arr of positive integers. You are also given the array queries where queries[i] = [left, right]. For each query i compute the X 阅读全文
摘要:
You are given a 0-indexed array nums of integers. A triplet of indices (i, j, k) is a mountain if: i < j < k nums[i] < nums[j] and nums[k] < nums[j] R 阅读全文
摘要:
You are given a binary string s and an integer k. A binary string satisfies the k-constraint if either of the following conditions holds: The number o 阅读全文
摘要:
Given a string s and an integer k, return the total number of substrings of s where at least one character appears at least k times. Example 1: Input: 阅读全文
摘要:
You are given a 0-indexed array nums and a non-negative integer k. In one operation, you can do the following: Choose an index i that hasn't been chos 阅读全文
摘要:
You are given an integer array nums and an integer k. The frequency of an element x is the number of times it occurs in an array. An array is called g 阅读全文
摘要:
You are given a digit string s that consists of digits from 0 to 9. A string is called semi-repetitive if there is at most one adjacent pair of the sa 阅读全文
摘要:
You are given an array nums consisting of positive integers. Starting with score = 0, apply the following algorithm: Choose the smallest integer of th 阅读全文
摘要:
Given a string s, return the maximum number of occurrences of any substring under the following rules: The number of unique characters in the substrin 阅读全文
摘要:
You are given a 2D integer array points, where points[i] = [xi, yi]. You are also given an integer w. Your task is to cover all the given points with 阅读全文
摘要:
Given an array of integers arr, return the number of subarrays with an odd sum. Since the answer can be very large, return it modulo 109 + 7. Example 阅读全文
摘要:
An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You are given an array of integer nu 阅读全文
摘要:
You are given a 0-indexed m x n matrix grid consisting of positive integers. You can start at any cell in the first column of the matrix, and traverse 阅读全文
摘要:
You are given two 0-indexed strings str1 and str2. In an operation, you select a set of indices in str1, and for each index i in the set, increment st 阅读全文
摘要:
There is a circle of red and blue tiles. You are given an array of integers colors. The color of tile i is represented by colors[i]: colors[i] == 0 me 阅读全文
摘要:
You are given an m x n matrix of characters box representing a side-view of a box. Each cell of the box is one of the following: A stone '#' A station 阅读全文
摘要:
You are given an integer n representing the number of players in a game and a 2D array pick where pick[i] = [xi, yi] represents that the player x pick 阅读全文
摘要:
You are given two integers m and n representing a 0-indexed m x n grid. You are also given two 2D integer arrays guards and walls where guards[i] = [r 阅读全文