随笔分类 -  LeetCode

1 2 3 4 5 ··· 9 下一页
摘要:周赛地址(英):weekly contest 197 周赛地址(中):第 197 场周赛 仓库地址:week-Leetcode 1512. Number of Good Pairs Given an array of integers nums. A pair (i,j) is called goo 阅读全文
posted @ 2020-07-12 21:37 mingL 阅读(155) 评论(0) 推荐(0) 编辑
摘要:周赛地址(英):weekly contest 196 周赛地址(中):第 196 场周赛 仓库地址:week-Leetcode 1502. Can Make Arithmetic Progression From Sequence Given an array of numbers arr. A s 阅读全文
posted @ 2020-07-05 12:28 mingL 阅读(149) 评论(0) 推荐(0) 编辑
摘要:周赛地址(英):weekly contest 195 周赛地址(中):第 195 场周赛 仓库地址:week-Leetcode 1496. Path Crossing Given a string path, where path[i] = 'N', 'S', 'E' or 'W', each re 阅读全文
posted @ 2020-06-28 18:21 mingL 阅读(164) 评论(0) 推荐(0) 编辑
摘要:周赛地址(英):Weekly Contest 194 周赛地址(中):第 194 场周赛 仓库地址:week-Leetcode 1486. XOR Operation in an Array Given an integer n and an integer start. Define an arr 阅读全文
posted @ 2020-06-21 18:09 mingL 阅读(234) 评论(0) 推荐(0) 编辑
摘要:周赛地址(英):weekly contest 193 周赛地址(中):第 193 场周赛 仓库地址:week-Leetcode 1480. Running Sum of 1d Array Given an array nums. We define a running sum of an array 阅读全文
posted @ 2020-06-14 15:32 mingL 阅读(176) 评论(0) 推荐(0) 编辑
摘要:给定一个无序的数组,找出数组在排序之后,相邻元素之间最大的差值。 如果数组元素个数小于 2,则返回 0。 示例 1: 输入: [3,6,9,1]输出: 3解释: 排序后的数组是 [1,3,6,9], 其中相邻元素 (3,6) 和 (6,9) 之间都存在最大差值 3。示例 2: 输入: [10]输出: 阅读全文
posted @ 2019-09-09 22:06 mingL 阅读(201) 评论(0) 推荐(0) 编辑
摘要:162. Find Peak Element A peak element is an element that is greater than its neighbors. Given an input array nums, where nums[i] ≠ nums[i+1], find a p 阅读全文
posted @ 2019-08-11 20:11 mingL 阅读(154) 评论(0) 推荐(0) 编辑
摘要:160. Intersection of Two Linked Lists Write a program to find the node at which the intersection of two singly linked lists begins. For example, the f 阅读全文
posted @ 2019-08-11 19:45 mingL 阅读(210) 评论(0) 推荐(0) 编辑
摘要:155. Min Stack Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. 阅读全文
posted @ 2019-08-03 21:57 mingL 阅读(163) 评论(0) 推荐(0) 编辑
摘要:154. Find Minimum in Rotated Sorted Array II Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0, 阅读全文
posted @ 2019-08-03 21:52 mingL 阅读(92) 评论(0) 推荐(0) 编辑
摘要:153. Find Minimum in Rotated Sorted Array Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2 阅读全文
posted @ 2019-07-27 20:10 mingL 阅读(93) 评论(0) 推荐(0) 编辑
摘要:152. Maximum Product Subarray Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the 阅读全文
posted @ 2019-07-22 19:36 mingL 阅读(131) 评论(0) 推荐(0) 编辑
摘要:151. Reverse Words in a String Given an input string, reverse the string word by word. Example 1: Input: "the sky is blue"Output: "blue is sky the"Exa 阅读全文
posted @ 2019-07-21 22:12 mingL 阅读(151) 评论(0) 推荐(0) 编辑
摘要:150. Evaluate Reverse Polish Notation Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each 阅读全文
posted @ 2019-07-14 22:39 mingL 阅读(113) 评论(0) 推荐(0) 编辑
摘要:149. Max Points on a Line Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Example 1: Example 2: NO 阅读全文
posted @ 2019-07-14 22:33 mingL 阅读(130) 评论(0) 推荐(0) 编辑
摘要:148. Sort List Sort a linked list in O(n log n) time using constant space complexity. Example 1: Example 2: 阅读全文
posted @ 2019-06-25 19:29 mingL 阅读(341) 评论(0) 推荐(0) 编辑
摘要:147. Insertion Sort List Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially con 阅读全文
posted @ 2019-06-25 19:26 mingL 阅读(126) 评论(0) 推荐(0) 编辑
摘要:146. LRU Cache Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get 阅读全文
posted @ 2019-06-20 22:19 mingL 阅读(313) 评论(0) 推荐(0) 编辑
摘要:145. Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes' values. Example: Follow up: Recursive solution 阅读全文
posted @ 2019-06-17 20:23 mingL 阅读(105) 评论(0) 推荐(0) 编辑
摘要:144. Binary Tree Preorder Traversal Given a binary tree, return the preorder traversal of its nodes' values. Example: Follow up: Recursive solution is 阅读全文
posted @ 2019-06-17 20:18 mingL 阅读(185) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 9 下一页
点击右上角即可分享
微信分享提示