算法OJ
文章平均质量分 71
Leo_Chen008
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode:109. Convert Sorted List to Binary Search Tree
题目要求大体如下: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in原创 2018-01-31 21:33:49 · 241 阅读 · 0 评论 -
LeetCode:106. Construct Binary Tree from Inorder and Postorder Traversal
题目的大体要求如下: Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, given inorder = [9,3,15,20,7] p原创 2018-01-30 12:54:12 · 260 阅读 · 0 评论 -
LeetCode:105. Construct Binary Tree from Preorder and Inorder Traversal
题目的要求如下: Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, given preorder = [3,9,20,15,7] ino原创 2018-01-28 16:29:41 · 242 阅读 · 0 评论 -
LeetCode:103.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 alternate between). For example: Given原创 2018-01-27 17:40:43 · 246 阅读 · 0 评论 -
LeetCode:120. Triangle
题目的大体要求如下: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [原创 2018-02-03 16:04:08 · 288 阅读 · 0 评论 -
LeetCode:102.Binary Tree Level Order Traversal
题目要求如下: Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level). For example: Given binary tree [3,9,20,null,null,15,7], 3 / \原创 2018-01-27 00:56:17 · 236 阅读 · 0 评论 -
LeetCode:114.Flatten Binary Tree to Linked List
题目的要求大体如下: Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \ 2原创 2018-02-03 00:39:57 · 276 阅读 · 0 评论 -
LeetCode: 98.Validate Binary Search Tree
以下是题目要求: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the nod原创 2018-01-26 00:11:15 · 278 阅读 · 0 评论 -
LeetCode:113. 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. For example: Given the below binary tree and sum = 22, 5原创 2018-02-01 20:38:31 · 307 阅读 · 0 评论 -
LeetCode:127. Word Ladder
题目要求大体如下: Given two words (beginWord and endWord), and a dictionary’s word list, find the length of shortest transformation sequence from beginWord to endWord, such that: Only one letter can be chan原创 2018-02-06 22:16:03 · 287 阅读 · 0 评论
分享