随笔分类 -  LeetCode

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 61 下一页
摘要: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.) 阅读全文
posted @ 2020-12-19 16:00 Grandyang 阅读(2891) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-12-18 15:15 Grandyang 阅读(376) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree with N nodes, each node has a different value from {1, ..., N}. A node in this binary tree can be flipped by swapping the left chi 阅读全文
posted @ 2020-12-17 15:57 Grandyang 阅读(648) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-12-16 12:39 Grandyang 阅读(595) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-12-15 14:50 Grandyang 阅读(1073) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-12-14 08:54 Grandyang 阅读(1878) 评论(0) 推荐(1) 编辑
摘要: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 阅读全文
posted @ 2020-12-13 07:17 Grandyang 阅读(648) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-12-12 15:32 Grandyang 阅读(608) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-12-11 15:38 Grandyang 阅读(1788) 评论(3) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-12-10 13:51 Grandyang 阅读(539) 评论(0) 推荐(0) 编辑
摘要:Given a single positive integer , we will write an expression of the form where each operator , , etc. is either addition, subtraction, multiplication 阅读全文
posted @ 2020-12-09 15:56 Grandyang 阅读(640) 评论(2) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-12-08 15:56 Grandyang 阅读(1037) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers, a ramp is a tuple for which `i 这道题说给了一个数组A,这里定义了一种叫做 Ramp 的范围 (i, j),满足 `i Github 同步地址: 参考资料: "LeetCode All in One 题目讲解汇总( 阅读全文
posted @ 2020-11-29 07:55 Grandyang 阅读(800) 评论(1) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-11-27 03:45 Grandyang 阅读(1152) 评论(0) 推荐(1) 编辑
摘要: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 阅读全文
posted @ 2020-11-23 08:54 Grandyang 阅读(690) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-10-31 23:56 Grandyang 阅读(992) 评论(0) 推荐(1) 编辑
摘要: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 阅读全文
posted @ 2020-09-21 12:30 Grandyang 阅读(1788) 评论(0) 推荐(1) 编辑
摘要: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 阅读全文
posted @ 2020-08-31 04:28 Grandyang 阅读(1622) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-08-17 13:51 Grandyang 阅读(1402) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2020-08-07 15:28 Grandyang 阅读(1067) 评论(0) 推荐(0) 编辑

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 61 下一页
Fork me on GitHub