原题地址:https://oj.leetcode.com/problems/unique-paths-ii/题意:Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many ...
分类:
编程语言 时间:
2014-06-15 23:33:26
阅读次数:
353
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum
...
分类:
其他好文 时间:
2014-06-15 19:26:23
阅读次数:
207
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,15,7},
...
分类:
其他好文 时间:
2014-06-15 15:17:43
阅读次数:
192
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Follow up:
Can you solve it without using extra space?
思路:由【Leetcode】Linked
List Cycle可知,利用一快一慢...
分类:
其他好文 时间:
2014-06-15 14:23:38
阅读次数:
288
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that
adding up all the values along the path equals the given sum.
For example:
Given the below bin...
分类:
其他好文 时间:
2014-06-15 09:34:35
阅读次数:
226
Top命令是Linux下常用的系统性能分析工具,能实时查看系统中各个进程资源占用情况。top - 16:24:25 up 284 days, 4:59, 1 user, load average: 0.10, 0.05, 0.01Tasks: 115 total, 1 running, 114 sl...
分类:
其他好文 时间:
2014-06-15 06:01:13
阅读次数:
310
Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted array A = [1,1,1,2,2,3],Your function should...
分类:
其他好文 时间:
2014-06-14 16:08:32
阅读次数:
200
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up: Can you solve it without using extra space?比...
分类:
其他好文 时间:
2014-06-14 15:48:59
阅读次数:
217
题目
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the array.
原题链接(点我)
解题思路
这题和Search in Rotated Sorted Array问题类似,...
分类:
其他好文 时间:
2014-06-14 12:44:18
阅读次数:
266
Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 respectively
in the...
分类:
其他好文 时间:
2014-06-14 12:02:12
阅读次数:
229