摘要:
You have a keyboard layout as shown above in the X-Y plane, where each English uppercase letter is located at some coordinate. For example, the letter 阅读全文
摘要:
There are n computers numbered from 0 to n - 1 connected by ethernet cables connections forming a network where connections[i] = [ai, bi] represents a 阅读全文
摘要:
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 阅读全文
摘要:
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, 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
Normally, vite build by default is building the production environment only, but we still can make it build development environment by adding --mode d 阅读全文
摘要:
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 阅读全文
摘要:
When you deploy with SAM CLI using sam deploy, you might get the following error: Error: Unable to upload artifact <YourComponent> referenced by Conte 阅读全文
摘要:
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 阅读全文
摘要:
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 + 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
If you configure CORS (Cross-Origin Resource Sharing) for an API, API Gateway automatically sends a response to preflight OPTIONS requests, even if th 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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: 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 - 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文