![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
思路汇聚出知识
路漫漫,远修兮
这个作者很懒,什么都没留下…
展开
-
LeetCode_134. Gas Station_路漫漫远修兮
一、原题目There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[i]of gas to travel from station...翻译 2019-03-28 16:14:29 · 176 阅读 · 0 评论 -
LeetCode_144. Binary Tree Preorder Traversal_路漫漫远修兮
一、原题目Given a binary tree, return thepreordertraversal of its nodes' values.二、题目大意给定一个棵树,返回先序遍历结果。三、作者代码:作者一:#思路一 递归遍历class Solution: def preorderTraversal(self, root: TreeN...翻译 2019-04-22 18:56:12 · 112 阅读 · 0 评论 -
LeetCode_94. Binary Tree Inorder Traversal_路漫漫远修兮
一、原题目Given a binary tree, return theinordertraversal of its nodes' values二、题目大意给定一个棵树,返回中序遍历。三、作者代码:作者一:#思路一:递归算法class Solution: def inorderTraversal(self, root: TreeNode) ...翻译 2019-04-22 19:10:15 · 131 阅读 · 0 评论 -
LeetCode_145. Binary Tree Postorder Traversal_路漫漫远修兮
一、原题目Given a binary tree, return thepostordertraversal of its nodes' values.二、题目大意给定一个棵树,返回后序遍历。三、作者代码:作者一:#思路一:class Solution(object): def postorderTraversal(self, root):...翻译 2019-04-22 19:22:49 · 125 阅读 · 0 评论 -
LeetCode_102. Binary Tree Level Order Traversal_路漫漫远修兮
一、原题目Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).二、题目大意题目大意:给定一棵树,进行层次遍历三、作者代码:作者一:#思路一:class Solution(ob...翻译 2019-04-22 20:15:39 · 138 阅读 · 0 评论