随笔分类 -  leecode

leecode exercises
摘要:题目来源 https://leetcode.com/problems/valid-palindrome/ Given a string, determine if it is a palindrome, considering only alphanumeric characters and ign 阅读全文
posted @ 2016-05-24 16:51 loadofleaf 阅读(488) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/triangle/ Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent number 阅读全文
posted @ 2016-05-24 16:47 loadofleaf 阅读(821) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/pascals-triangle-ii/ Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return 阅读全文
posted @ 2016-05-24 16:44 loadofleaf 阅读(516) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/pascals-triangle/ Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Re 阅读全文
posted @ 2016-05-24 16:40 loadofleaf 阅读(420) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/populating-next-right-pointers-in-each-node/ Given a binary tree Populate each next pointer to point to its next ri 阅读全文
posted @ 2016-05-24 16:37 loadofleaf 阅读(1077) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/flatten-binary-tree-to-linked-list/ Given a binary tree, flatten it to a linked list in-place. 题意分析 Input: binary t 阅读全文
posted @ 2016-05-24 16:31 loadofleaf 阅读(600) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/path-sum-ii/ Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. 阅读全文
posted @ 2016-05-17 17:03 loadofleaf 阅读(388) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/path-sum/ Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the 阅读全文
posted @ 2016-05-17 17:01 loadofleaf 阅读(765) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/minimum-depth-of-binary-tree/ Given a binary tree, find its minimum depth. The minimum depth is the number of nodes 阅读全文
posted @ 2016-05-17 16:58 loadofleaf 阅读(658) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/balanced-binary-tree/ Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced 阅读全文
posted @ 2016-05-17 16:56 loadofleaf 阅读(973) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ Given a binary tree, return the bottom-up level order traversal of its nodes' 阅读全文
posted @ 2016-05-17 16:53 loadofleaf 阅读(564) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/maximum-depth-of-binary-tree/ Given a binary tree, find its maximum depth. The maximum depth is the number of nodes 阅读全文
posted @ 2016-05-17 16:51 loadofleaf 阅读(755) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ Given a binary tree, return the zigzag level order traversal of its nodes 阅读全文
posted @ 2016-05-17 16:49 loadofleaf 阅读(961) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/binary-tree-level-order-traversal/ Given a binary tree, return the level order traversal of its nodes' values. (ie, 阅读全文
posted @ 2016-05-17 16:46 loadofleaf 阅读(911) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/symmetric-tree/ Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). 题意分析 阅读全文
posted @ 2016-05-17 16:44 loadofleaf 阅读(844) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/same-tree/ Given two binary trees, write a function to check if they are equal or not. Two binary trees are conside 阅读全文
posted @ 2016-05-17 16:41 loadofleaf 阅读(815) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/validate-binary-search-tree/ Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST 阅读全文
posted @ 2016-05-03 18:27 loadofleaf 阅读(574) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/binary-tree-inorder-traversal/ iven a binary tree, return the inorder traversal of its nodes' values. For example:G 阅读全文
posted @ 2016-05-03 17:39 loadofleaf 阅读(263) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/restore-ip-addresses/ Given a string containing only digits, restore it by returning all possible valid IP address 阅读全文
posted @ 2016-05-03 17:35 loadofleaf 阅读(268) 评论(0) 推荐(0)
摘要:题目来源 https://leetcode.com/problems/reverse-linked-list-ii/ Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Giv 阅读全文
posted @ 2016-05-03 17:31 loadofleaf 阅读(186) 评论(0) 推荐(0)