随笔分类 -  LeetCode

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 61 下一页
摘要: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 阅读全文
posted @ 2020-12-24 14:07 Grandyang 阅读(1002) 评论(0) 推荐(2)
摘要: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 阅读全文
posted @ 2020-12-22 13:32 Grandyang 阅读(1058) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2020-12-22 13:30 Grandyang 阅读(2498) 评论(0) 推荐(1)
摘要: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 阅读全文
posted @ 2020-12-21 14:32 Grandyang 阅读(1429) 评论(0) 推荐(0)
摘要:Given an array of integers, return the number of (contiguous, non empty) subarrays that have a sum divisible by . Example 1: Note: 1. `1 这道题给了一个数组,让返回 阅读全文
posted @ 2020-12-20 12:43 Grandyang 阅读(2093) 评论(0) 推荐(0)
摘要: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 阅读(3212) 评论(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 阅读(428) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2020-12-17 15:57 Grandyang 阅读(709) 评论(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 阅读(630) 评论(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 阅读(1150) 评论(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 阅读(1971) 评论(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 阅读(715) 评论(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 阅读(707) 评论(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 阅读(1933) 评论(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 阅读(575) 评论(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 阅读(699) 评论(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 阅读(1142) 评论(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 阅读(1086) 评论(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 阅读(1203) 评论(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 阅读(729) 评论(0) 推荐(0)

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