- 博客(11)
- 收藏
- 关注
原创 【leetcode】357. Count Numbers with Unique Digits【M】【72】
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x n.Example:Given n = 2, return 91. (The answer should be the total numbers in the range of 0 ≤ x [11,22,33,44,
2016-06-21 17:42:23 331
原创 【leetcode】155. Min Stack【E】【98】
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get
2016-06-16 13:07:31 290
原创 mysql 远程连接其他主机上的数据库 + 10038错误
1、在控制台执行 mysql -u root -p mysql,系统提示输入数据库root用户的密码,输入完成后即进入mysql控制台,这个命令的第一个mysql是执行命令,第二个mysql是系统数据名称,不一样的。 2、在mysql控制台执行 GRANT ALL PRIVILEGES ON *.* TO ‘root'@'%' IDENTIFIED BY ‘MyPassword' WITH
2016-06-15 23:49:11 854
原创 【leetcode】146. LRU Cache【H】【9】
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if
2016-06-08 13:20:42 555
原创 106. Construct Binary Tree from Inorder and Postorder Traversal【M】【31】
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.Subscribe to see which companies asked this
2016-06-07 15:13:21 334
原创 105. Construct Binary Tree from Preorder and Ignorer Traversal【M】【35】【再来一遍】
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.Subscribe to see which companies asked this q
2016-06-07 14:58:21 556
原创 54. Spiral Matrix 【M】【82】
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]You
2016-06-06 15:19:07 304
原创 57. Insert Interval【H】【67】
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.E
2016-06-04 15:55:09 303
原创 56. Merge Intervals【H】【67】
Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].Subscribe to see which companies asked t
2016-06-04 15:41:28 312
原创 97. Interleaving String【H】【73】
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", return true.When s3 = "aadbbbaccc", ret
2016-06-03 16:33:17 484
原创 295. Find Median from Data Stream【H】【2.7】
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value.Examples: [2,3,4] , the me
2016-06-02 09:14:17 343
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人