
leetcode
日拱一卒的Alex
一个乐观善良且温暖的人,认真对待生活中的每一天,成为更好的自己
展开
-
LeetCode 402. Remove K Digits
LeetCode 402. Remove K Digits原创 2017-08-15 10:30:48 · 119 阅读 · 0 评论 -
LeetCode 675. Cut Off Trees for Golf Event
675. Cut Off Trees for Golf EventYou are asked to cut off trees in a forest for a golf event. The forest is represented as a non-negative 2D map, in this map:0 represents the obstacle can'原创 2017-09-21 10:03:57 · 1317 阅读 · 1 评论 -
LeetCode 494. Target Sum
494. Target SumYou are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its ne原创 2017-09-11 16:33:08 · 187 阅读 · 0 评论 -
Leetcode 547. Friend Circles
Leetcode 547. Friend Circles JAVA实现 深度优先遍历原创 2017-09-11 15:36:31 · 217 阅读 · 0 评论 -
LeetCode 515. Find Largest Value in Each Tree Row
1.题目题意简而言之就是求一颗二叉树的每一层最大节点,并用集合的形式将其返回。2.思路我的想法比较愚笨,是将此二叉树中的每一个节点标记上其所在的层数,然后在按层次标记遍历所有节点得出每一层的最大节点。其中做层次标记的时候与找最大节点时候都是用的层次遍历。3.代码 class TreeNode { int val; TreeNode left;原创 2017-09-18 18:37:28 · 396 阅读 · 0 评论 -
LeetCode 410. Split Array Largest Sum
LeetCode 410. Split Array Largest Sum 动态规划 最小m段和问题原创 2017-08-15 19:10:59 · 347 阅读 · 0 评论 -
LeetCode 394. Decode String
LeetCode 第394题 Decode String 的JAVA实现原创 2017-08-08 10:34:07 · 225 阅读 · 0 评论 -
LeetCode 224. Basic Calculator
LeetCode 第224题 Basic Calculator JAVA语言实现原创 2017-08-08 15:12:07 · 295 阅读 · 0 评论 -
LeetCode 198. House Robber
198. House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of th原创 2017-08-14 10:26:25 · 100 阅读 · 0 评论