- 博客(60)
- 收藏
- 关注
原创 leetcode142
1、Linked List Cycle II Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.Follow up: Can you solve it without using ext
2017-03-09 09:34:19 555
原创 leetcode515
1、Find Largest Value in Each Tree Row You need to find the largest value in each row of a binary tree.Example:
2017-03-08 11:05:52 473
原创 leetcode111
Minimum Depth of Binary Tree Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
2017-03-08 10:25:01 471
原创 leetcode104
1、 Maximum Depth of Binary Tree Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
2017-03-08 10:09:44 426
原创 leetcode513
Find Bottom Left Tree Value Given a binary tree, find the leftmost value in the last row of the tree.Example 1:
2017-03-08 09:50:01 522
原创 二叉树的深度优先和广度优先遍历
深度优先等效于先序遍历,根左右的顺序,常常采用递归或者堆栈(后进先出)实现,所以我们先把右子树放入栈中,后放左子树,这样所有的左子树访问完了
2017-03-06 14:43:35 553
原创 leetcode62
Unique PathsA robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any point in time. The robot is trying to rea
2017-03-03 10:14:57 430
原创 leetcode485
1、Max Consecutive Ones Given a binary array, find the maximum number of consecutive 1s in this array.Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two digits or the last three di
2017-03-03 10:03:22 347
原创 C++11中与Boost库相关的部分新特性总结
改进单例模式使用c改进程序性能Move右值引用FunctionalForward新的标准库stdforwardunordered_mapunordered_set顺序容器库让程序更简洁更现代Typeofauto decltype推断变量或表达式的数据类型ResultOf新的标准库stdresult_ofValueinitializedList-initializationBOOST
2017-01-10 16:54:15 1086
原创 leetcode258
1、Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has onl
2017-01-05 10:48:56 282
原创 leetcode217
1、Contains Duplicate Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return fals
2017-01-04 22:15:30 258
原创 leetcode389
1、Find the Difference Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the le
2017-01-03 21:17:20 287
原创 leetcode136
1、Single Number Given an array of integers, every element appears twice except for one. Find that single one.
2017-01-03 21:07:19 342
原创 leetcode167
1、Two Sum II - Input array is sorted Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should
2017-01-03 17:11:27 288
转载 排序算法总结
概述排序有内部排序和外部排序,内部排序是数据记录在内存中进行排序,而外部排序是因排序的数据很大,一次不能容纳全部的排序记录,在排序过程中需要访问外存。
2017-01-02 21:42:50 375
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人