09 2021 档案
摘要:Given an array nums of positive integers, return the longest possible length of an array prefix of nums, such that it is possible to remove exactly on
阅读全文
摘要:A die simulator generates a random number from 1 to 6 for each roll. You introduced a constraint to the generator such that it cannot roll the number
阅读全文
摘要:When you try to debug C++ in Visual Studio Code on Mac, you might have the following error: Errors exist after running preLaunchTask 'C/C++: clang++ b
阅读全文
摘要:On an 8x8 chessboard, there can be multiple Black Queens and one White King. Given an array of integer coordinates queens that represents the position
阅读全文
摘要:Balanced strings are those that have an equal quantity of 'L' and 'R' characters. Given a balanced string s, split it in the maximum amount of balance
阅读全文
摘要:Given an integer n, your task is to count how many strings of length n can be formed under the following rules: Each character is a lower case vowel (
阅读全文
摘要:In a gold mine grid of size m x n, each cell in this mine has an integer representing the amount of gold in that cell, 0 if it is empty. Return the ma
阅读全文
摘要:When use the VsVim plugin in Visual Studio for Mac and type the closing part of a parenthesis, you might see ClosePair(')') pop up with awkward sound.
阅读全文
摘要:Given an integer array arr and an integer difference, return the length of the longest subsequence in arr which is an arithmetic sequence such that th
阅读全文
摘要:We have n chips, where the position of the ith chip is position[i]. We need to move all the chips to the same position. In one step, we can change the
阅读全文
摘要:In an n*n grid, there is a snake that spans 2 cells and starts moving from the top left corner at (0, 0) and (0, 1). The grid has empty cells represen
阅读全文