上一页 1 2 3 4 5 6 ··· 44 下一页
摘要: Given 3 positives numbers a, b and c. Return the minimum flips required in some bits of a and b to make ( a OR b == c ). (bitwise OR operation). Flip 阅读全文
posted @ 2022-10-17 04:00 Grandyang 阅读(264) 评论(0) 推荐(0) 编辑
摘要: No-Zero integer is a positive integer that does not contain any 0 in its decimal representation. Given an integer n, return a list of two integers [A, 阅读全文
posted @ 2022-10-06 12:40 Grandyang 阅读(303) 评论(0) 推荐(0) 编辑
摘要: Return the number of distinct non-empty substrings of text that can be written as the concatenation of some string with itself (i.e. it can be written 阅读全文
posted @ 2022-10-02 05:00 Grandyang 阅读(259) 评论(0) 推荐(0) 编辑
摘要: Using CloudFormation template to create CodePipeline should be the best practice to maintain a pipeline. There are a lot of posts or videos online tha 阅读全文
posted @ 2022-09-05 07:16 Grandyang 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Normally, vite build by default is building the production environment only, but we still can make it build development environment by adding --mode d 阅读全文
posted @ 2022-09-05 06:49 Grandyang 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Unlike AWS_REGION or AWS_LAMBDA_FUNCTION_NAME, we cannot get current account id from the environment variables. In order to to get the account id, we 阅读全文
posted @ 2022-09-03 13:56 Grandyang 阅读(67) 评论(0) 推荐(0) 编辑
摘要: When you deploy with SAM CLI using sam deploy, you might get the following error: Error: Unable to upload artifact <YourComponent> referenced by Conte 阅读全文
posted @ 2022-09-02 13:40 Grandyang 阅读(783) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, return the sum of values of nodes with an even-valued grandparent. If there are no nodes with an even-valued grandpar 阅读全文
posted @ 2022-08-31 12:50 Grandyang 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Given a m x n matrix mat and an integer k, return a matrix answer where each answer[i][j] is the sum of all elements mat[r][c] for: i - k <= r <= i + 阅读全文
posted @ 2022-08-17 13:45 Grandyang 阅读(394) 评论(0) 推荐(0) 编辑
摘要: We are given a list nums of integers representing a list compressed with run-length encoding. Consider each adjacent pair of elements [freq, val] = [n 阅读全文
posted @ 2022-08-11 14:03 Grandyang 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given a string s. In one step you can insert any character at any index of the string. Return the minimum number of steps to make s palindrome. A Pali 阅读全文
posted @ 2022-08-06 12:25 Grandyang 阅读(365) 评论(0) 推荐(0) 编辑
摘要: There are n people, each person has a unique id between 0 and n-1. Given the arrays watchedVideos and friends, where watchedVideos[i] and friends[i] c 阅读全文
posted @ 2022-07-23 10:34 Grandyang 阅读(332) 评论(0) 推荐(0) 编辑
摘要: Given an equation, represented by words on the left side and the result on the right side. You need to check if the equation is solvable under the fol 阅读全文
posted @ 2022-07-15 12:29 Grandyang 阅读(341) 评论(0) 推荐(0) 编辑
摘要: You are given an array arr of positive integers. You are also given the array queries where queries[i] = [lefti, righti]. For each query i compute the 阅读全文
posted @ 2022-07-08 21:24 Grandyang 阅读(172) 评论(0) 推荐(0) 编辑
摘要: You are given a string s formed by digits and '#'. We want to map s to English lowercase characters as follows: Characters ('a' to 'i') are represente 阅读全文
posted @ 2022-06-27 06:10 Grandyang 阅读(181) 评论(0) 推荐(0) 编辑
摘要: When use AWS API gateway with lambda authorizer, you may get 403 Forbidden error code with the error message User is not authorized to access this res 阅读全文
posted @ 2022-06-20 08:31 Grandyang 阅读(375) 评论(0) 推荐(0) 编辑
摘要: If you configure CORS (Cross-Origin Resource Sharing) for an API, API Gateway automatically sends a response to preflight OPTIONS requests, even if th 阅读全文
posted @ 2022-06-19 04:54 Grandyang 阅读(53) 评论(0) 推荐(0) 编辑
摘要: AWS Lambda allows you to write customized authorizer for the API gateway, here is the video for Secure your API Gateway with Lambda Authorizer | Step 阅读全文
posted @ 2022-06-17 14:33 Grandyang 阅读(1194) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers arr, you are initially positioned at start index of the array. When you are at index i, you can jump to i + ar 阅读全文
posted @ 2022-06-12 14:25 Grandyang 阅读(435) 评论(0) 推荐(0) 编辑
摘要: AWS lambda function has some built-in packages, but when you use some other packages (like requests), you might get the following error: Unable to imp 阅读全文
posted @ 2022-06-06 12:59 Grandyang 阅读(571) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, return any array containing n unique integers such that they add up to 0. Example 1: Input: n = 5 Output: [-7,-1,1,3,4] Explanatio 阅读全文
posted @ 2022-06-04 12:28 Grandyang 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Given two binary search trees root1 and root2, return a list containing all the integers from both trees sorted in ascending order. Example 1: Input: 阅读全文
posted @ 2022-05-29 14:16 Grandyang 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, return the sum of values of its deepest leaves. Example 1: Input: root = [1,2,3,4,5,null,6,7,null,null,null,null,8] O 阅读全文
posted @ 2022-05-26 10:15 Grandyang 阅读(245) 评论(0) 推荐(0) 编辑
摘要: You are given a square board of characters. You can move on the board starting at the bottom right square marked with the character 'S'. You need to r 阅读全文
posted @ 2022-05-23 12:47 Grandyang 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with - 阅读全文
posted @ 2022-05-18 12:50 Grandyang 阅读(145) 评论(0) 推荐(0) 编辑
摘要: You have n boxes labeled from 0 to n - 1. You are given four arrays: status, candies, keys, and containedBoxes where: status[i] is 1 if the ith box is 阅读全文
posted @ 2022-05-16 03:17 Grandyang 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given an integer array arr and a target value target, return the integer value such that when we change all the integers larger than value in the give 阅读全文
posted @ 2022-05-11 13:51 Grandyang 阅读(313) 评论(0) 推荐(0) 编辑
摘要: Given a string s, return the maximum number of ocurrences of any substring under the following rules: The number of unique characters in the substring 阅读全文
posted @ 2022-05-05 13:16 Grandyang 阅读(320) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums and a positive integer k, check whether it is possible to divide this array into sets of k consecutive numbers. Return 阅读全文
posted @ 2022-04-27 11:41 Grandyang 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of integers, return how many of them contain an even number of digits. Example 1: Input: nums = [12,345,2,6,7896] Output: 2 Explan 阅读全文
posted @ 2022-04-24 01:22 Grandyang 阅读(228) 评论(0) 推荐(0) 编辑
摘要: You are given a map of a server center, represented as a m * n integer matrix grid, where 1 means that on that cell there is a server and 0 means that 阅读全文
posted @ 2022-04-22 12:19 Grandyang 阅读(204) 评论(0) 推荐(0) 编辑
摘要: You are given an m x n integer matrix grid where each cell is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right from and to an e 阅读全文
posted @ 2022-04-19 12:40 Grandyang 阅读(771) 评论(0) 推荐(0) 编辑
摘要: Given a m x n matrix mat and an integer threshold, return the maximum side-length of a square with a sum less than or equal to threshold or return 0 i 阅读全文
posted @ 2022-04-15 09:51 Grandyang 阅读(1091) 评论(0) 推荐(0) 编辑
摘要: An integer has sequential digits if and only if each digit in the number is one more than the previous digit. Return a sorted list of all the integers 阅读全文
posted @ 2022-04-04 23:15 Grandyang 阅读(428) 评论(0) 推荐(0) 编辑
摘要: Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the bi 阅读全文
posted @ 2022-03-25 22:55 Grandyang 阅读(430) 评论(0) 推荐(0) 编辑
摘要: Given an n x n integer matrix grid, return the minimum sum of a falling path with non-zero shifts. A falling path with non-zero shifts is a choice of 阅读全文
posted @ 2022-03-25 11:01 Grandyang 阅读(609) 评论(0) 推荐(0) 编辑
摘要: Given an array intervals where intervals[i] = [li, ri] represent the interval [li, ri), remove all intervals that are covered by another interval in t 阅读全文
posted @ 2022-03-22 13:45 Grandyang 阅读(394) 评论(0) 推荐(0) 编辑
摘要: Given an integer array sorted in non-decreasing order, there is exactly one integer in the array that occurs more than 25% of the time, return that in 阅读全文
posted @ 2022-03-20 08:31 Grandyang 阅读(326) 评论(0) 推荐(0) 编辑
摘要: Design the CombinationIterator class: CombinationIterator(string characters, int combinationLength) Initializes the object with a string characters of 阅读全文
posted @ 2022-03-07 13:54 Grandyang 阅读(336) 评论(0) 推荐(0) 编辑
摘要: Given a m x n binary matrix mat. In one step, you can choose one cell and flip it and all the four neighbors of it if they exist (Flip is changing 1 t 阅读全文
posted @ 2022-02-28 23:52 Grandyang 阅读(432) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 44 下一页
Fork me on GitHub