- 博客(5)
- 问答 (2)
- 收藏
- 关注
原创 leetcode No145. Binary Tree Postorder Traversal
Question Given a binary tree, return the postorder traversal of its nodes’ values. Example: Input: [1,null,2,3] 1 \ 2 / 3 Output: [3,2,1] Output: [3,2,1] Follow up: Recursive solu...
2019-01-29 11:36:49 185
原创 leetcode No448. Find All Numbers Disappeared in an Array
Question Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] inclusive that do not appear in this arra...
2019-01-18 19:49:28 139
原创 leetcode No461. Hamming Distance
Question The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calculate the Hamming distance. Note: 0 ≤ x, y ...
2019-01-17 19:45:11 140
原创 leetcode No221. Maximal Square
Question Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing only 1’s and return its area. Example: Input: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 Output: 4 Algori...
2019-01-16 15:56:17 143
原创 leetcode No207. Course Schedule
这一题是典型的拓扑排序(Topological sort),在解这题之前我是没有看过图相关的算法,仅仅知道一些基本概念。 在解这道题之前,我们需要知道几个概念: 有向图(Directed Graph) 邻接表(Adjacency-list) 出度(out degree) 入度(in degree) 接着我们知道用什么数据结构来表示一张图: 结构体 二维vector ...
2019-01-14 20:17:18 287
空空如也
hexo 搭建博客-hexo new出错
2017-03-16
stable_partition怎么实现的
2016-10-08
TA创建的收藏夹 TA关注的收藏夹
TA关注的人