11 2024 档案
摘要: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
阅读全文
摘要:You are given a string s consisting of the characters 'a', 'b', and 'c' and a non-negative integer k. Each minute, you may take either the leftmost ch
阅读全文
摘要:You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of n and a key k. To decr
阅读全文
摘要:An image smoother is a filter of the size 3 x 3 that can be applied to each cell of an image by rounding down the average of the cell and the eight su
阅读全文
摘要:You are given two integer arrays persons and times. In an election, the ith vote was cast for persons[i] at time times[i]. For each query at a time t,
阅读全文
摘要:Design a data structure to find the frequency of a given value in a given subarray. The frequency of a value in a subarray is the number of occurrence
阅读全文
摘要:You are given an m x n binary matrix grid. A row or column is considered palindromic if its values read the same forward and backward. You can flip an
阅读全文
摘要:You are given an integer n indicating there are n specialty retail stores. There are m product types of varying amounts, which are given as a 0-indexe
阅读全文
摘要:Given two integer arrays arr1 and arr2, and the integer d, return the distance value between the two arrays. The distance value is defined as the numb
阅读全文
摘要:You are given a 2D integer array items where items[i] = [pricei, beautyi] denotes the price and beauty of an item respectively. You are also given a 0
阅读全文
摘要:Given a string s, return the maximum length of a substring such that it contains at most two occurrences of each character. Example 1: Input: s = "bcb
阅读全文
摘要:You are given an integer array nums and two positive integers m and k. Return the maximum sum out of all almost unique subarrays of length k of nums.
阅读全文
摘要:Given an array of integers arr and two integers k and threshold, return the number of sub-arrays of size k and average greater than or equal to thresh
阅读全文
摘要: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 AND is equal to 1 & 5 & 3
阅读全文
摘要: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
阅读全文
摘要: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:
阅读全文
摘要:自己曾经做了一个网站部署在一台 ubuntu 服务器上,但是由于一开始不会配置 SSL,所以花钱买了付费的 SSL。最近发现了 Let's Encrypt,可以免费申请 SSL 证书,下面是详细的教程。 我的网站是一个 React 的项目,所以我的服务器上只是一个简单的 Node.js 环境 + N
阅读全文
摘要:You are given two positive integers n and k. You can choose any bit in the binary representation of n that is equal to 1 and change it to 0. Return th
阅读全文

浙公网安备 33010602011771号