![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
algorithm
fishermanZzhang
静以修身 俭以养德
展开
-
二叉树的非递归遍历
二叉树的遍历仅为自己提个醒,只因为它如此重要原创 2016-03-05 20:43:39 · 683 阅读 · 0 评论 -
58. Length of Last Word
Length of Last Word Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string. If the last word does not exist, return原创 2016-02-23 22:07:04 · 549 阅读 · 0 评论 -
103. Binary Tree Zigzag Level Order Traversal
Binary Tree Zigzag Level Order Traversal Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternat原创 2016-02-23 10:58:48 · 542 阅读 · 0 评论 -
63. Unique Paths II
Unique Paths II原创 2016-02-18 18:02:25 · 470 阅读 · 0 评论 -
64. Minimum Path Sum
Minimum Path Sum Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move eit原创 2016-02-22 22:41:25 · 524 阅读 · 0 评论 -
77. Combinations
Combinations原创 2016-02-20 17:54:45 · 595 阅读 · 0 评论 -
74. Search a 2D Matrix
Search a 2D Matrix Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right. The原创 2016-02-19 21:51:49 · 468 阅读 · 0 评论 -
Binary Tree Level Order Traversal I II(102、107)
Binary Tree Level Order Traversal原创 2016-02-21 15:09:29 · 780 阅读 · 1 评论 -
根结点到所有叶子结点的路径问题
这是一个典型的面试题。从网上查了很多代码,感觉部分写的不够严谨。今天做一个汇总。 思路: 1. 递归+回溯 2. 非递归的后序遍历(单栈版),每当遇到叶子结点,输出栈中元素即可。以下代码都是基于思路一的代码。原创 2016-03-06 22:56:27 · 2021 阅读 · 2 评论 -
78. Subsets
Subsets Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution set must not contain duplicate subsets原创 2016-02-20 20:31:34 · 613 阅读 · 0 评论 -
114. Flatten Binary Tree to Linked List
Flatten Binary Tree to Linked List如果能够使得叶子节点的right指向其后继的话,这样就很容易展成题目要求的形式了原创 2016-02-19 09:51:10 · 547 阅读 · 0 评论 -
62. Unique Paths
Unique Paths原创 2016-02-18 17:41:15 · 608 阅读 · 1 评论