摘要:
You are given the root of a binary tree with n nodes where each node in the tree has node.val coins and there are n coins total. In one move, we may c 阅读全文
摘要:
Given an integer array , return the length of a maximum size turbulent subarray of . A subarray is turbulent if the comparison sign flips between each 阅读全文
摘要:
Given an array of positive lengths, return the largest perimeter of a triangle with non zero area, formed from 3 of these lengths. If it is impossible 阅读全文
摘要:
Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. Example 1: I 阅读全文
摘要:
You are given an integer array . From some starting index, you can make a series of jumps. The (1st, 3rd, 5th, ...) jumps in the series are called odd 阅读全文
摘要:
Given an array of integers, return the number of (contiguous, non empty) subarrays that have a sum divisible by . Example 1: Note: 1. `1 这道题给了一个数组,让返回 阅读全文
摘要:
We have a list of on the plane. Find the closest points to the origin . (Here, the distance between two points on a plane is the Euclidean distance.) 阅读全文
摘要:
Given two strings and , each of which represents a non negative rational number, return True if and only if they represent the same number. The string 阅读全文
摘要:
You are given the root of a binary tree with n nodes, where each node is uniquely assigned a value from 1 to n. You are also given a sequence of n val 阅读全文
摘要:
Given two positive integers and , an integer is powerful if it is equal to for some integers and . Return a list of all powerful integers that have va 阅读全文
摘要:
Given an array of integers , sort the array by performing a series of pancake flips. In one pancake flip we do the following steps: Choose an integer 阅读全文
摘要:
Given a binary tree, we install cameras on the nodes of the tree. Each camera at a node can monitor its parent, itself, and its immediate children. Ca 阅读全文
摘要:
Return all non negative integers of length such that the absolute difference between every two consecutive digits is . Note that every number in the a 阅读全文
摘要:
Given a wordlist, we want to implement a spellchecker that converts a query word into a correct word. For a given query word, the spell checker handle 阅读全文
摘要:
Given the root of a binary tree, calculate the vertical order traversal of the binary tree. For each node at position (row, col), its left and right c 阅读全文
摘要:
A binary tree is univalued if every node in the tree has the same value. Return if and only if the given tree is univalued. Example 1: Example 2: Note 阅读全文
摘要:
Given a single positive integer , we will write an expression of the form where each operator , , etc. is either addition, subtraction, multiplication 阅读全文
摘要:
Given a set of points in the xy plane, determine the minimum area of any rectangle formed from these points, with sides not necessarily parallel to th 阅读全文
摘要:
Given an array of integers, a ramp is a tuple for which `i 这道题说给了一个数组A,这里定义了一种叫做 Ramp 的范围 (i, j),满足 `i Github 同步地址: 参考资料: "LeetCode All in One 题目讲解汇总( 阅读全文
摘要:
In a array of size , there are unique elements, and exactly one of these elements is repeated times. Return the element repeated times. Example 1: Exa 阅读全文
摘要:
We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we 阅读全文
摘要:
In a N x N grid composed of 1 x 1 squares, each 1 x 1 square consists of a /, \, or blank space. These characters divide the square into contiguous re 阅读全文
摘要:
Given a binary tree, determine if it is a complete binary tree. Definition of a complete binary tree from Wikipedia: In a complete binary tree every l 阅读全文
摘要:
There are 8 prison cells in a row, and each cell is either occupied or vacant. Each day, whether the cell is occupied or vacant changes according to t 阅读全文
摘要:
You are installing a billboard and want it to have the largest height. The billboard will have two steel supports, one on each side. Each steel suppor 阅读全文
摘要:
We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we 阅读全文
摘要:
Given an array of integers A with even length, return true if and only if it is possible to reorder it such that A[2 * i + 1] = 2 * A[2 * i] for every 阅读全文
摘要:
In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. The order of the alphabet is some permu 阅读全文
摘要:
Given a non-empty array of unique positive integers A, consider the following graph: There are A.length nodes, labelled A[0] to A[A.length - 1]; There 阅读全文
摘要:
For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip e 阅读全文
摘要:
In a deck of cards, every card has a unique integer. You can order the deck in any order you want. Initially, all the cards start face down (unreveale 阅读全文
摘要:
Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Starting f 阅读全文
摘要:
You have an initial power P, an initial score of 0 points, and a bag of tokens. Each token can be used at most once, has a value token[i], and has pot 阅读全文
摘要:
On a 2D plane, we place stones at some integer coordinate points. Each coordinate point may have at most one stone. Now, a move consists of removing a 阅读全文
摘要:
Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop o 阅读全文
摘要:
Given an array of integers A, a move consists of choosing any , and incrementing it by . Return the least number of moves to make every value in uniqu 阅读全文
摘要:
DynamoDB 是 AWS 全家桶中非常重要的一个服务,跟 MongoDB 一样,是 NoSQL 数据库。有时候我们需要将某个表的数据整个导出或者导入,如果数据量很大的话,建议使用 AWS Data Pipeline 导出和导入 DynamoDB,如果数据量不是特别大的话,建议使用 AWS CLI 阅读全文
摘要:
We are given an array of lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we del 阅读全文
摘要:
Given an array A of strings, find any smallest string that contains each string in A as a substring. We may assume that no string in A is substring of 阅读全文
摘要:
Given a string that only contains "I" (increase) or "D" (decrease), let . Return any permutation of such that for all : If , then Example 1: Example 2 阅读全文