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 阅读全文
posted @ 2021-09-27 08:58 Grandyang 阅读(537) 评论(0) 推荐(0) 编辑
摘要: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  阅读全文
posted @ 2021-09-23 12:21 Grandyang 阅读(813) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2021-09-20 11:03 Grandyang 阅读(655) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2021-09-17 23:53 Grandyang 阅读(381) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2021-09-13 23:22 Grandyang 阅读(662) 评论(0) 推荐(0) 编辑
摘要: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 ( 阅读全文
posted @ 2021-09-12 11:18 Grandyang 阅读(583) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2021-09-10 12:54 Grandyang 阅读(689) 评论(0) 推荐(0) 编辑
摘要: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. 阅读全文
posted @ 2021-09-10 09:55 Grandyang 阅读(139) 评论(1) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2021-09-08 12:14 Grandyang 阅读(567) 评论(0) 推荐(1) 编辑
摘要: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 阅读全文
posted @ 2021-09-05 02:39 Grandyang 阅读(449) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2021-09-04 11:09 Grandyang 阅读(512) 评论(0) 推荐(0) 编辑

Fork me on GitHub