上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
摘要: 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 阅读(125) 评论(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 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 143. Reorder List Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You may not modify the values in the list's nod 阅读全文
posted @ 2019-06-15 21:42 mingL 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 142. Linked List Cycle II Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in the 阅读全文
posted @ 2019-06-13 21:20 mingL 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 141. Linked List Cycle Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos wh 阅读全文
posted @ 2019-06-13 21:08 mingL 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 140. Word Break II Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence 阅读全文
posted @ 2019-06-11 22:34 mingL 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 首先要清楚类和对象之间的关系,然后要清楚实例化(new)的过程中发生了什么。 笔者认为类和对象的关系比较好理解,就如同要按照图纸盖一幢房子,图纸就是类,房子就是对象。类是对象的抽象,对象是类的实体体现。 new的过程发生了什么呢? var Person=function(name,age){ thi 阅读全文
posted @ 2019-06-10 20:45 mingL 阅读(1116) 评论(0) 推荐(0) 编辑
摘要: 139. Word Break Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a spac 阅读全文
posted @ 2019-06-06 20:12 mingL 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 138. Copy List with Random Pointer A linked list is given such that each node contains an additional random pointer which could point to any node in t 阅读全文
posted @ 2019-06-03 23:12 mingL 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 效果: 来源:http://es6.ruanyifeng.com/#docs/set-map 阅读全文
posted @ 2019-06-01 09:39 mingL 阅读(1114) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页