随笔分类 - Leetcode
摘要:题目链接 "https://leetcode.com/problems/flatten binary tree to linked list/" 题目原文 Given a binary tree, flatten it to a linked list in place. For example,
阅读全文
摘要:题目链接 "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 giv
阅读全文
摘要:题目链接 "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 a
阅读全文
摘要:题目链接 "https://leetcode.com/problems/minimum depth of binary tree/" 题目原文 Given a binary tree, find its minimum depth. The minimum depth is the number o
阅读全文
摘要:题目链接 "https://leetcode.com/problems/balanced binary tree/" 题目原文 Given a binary tree, determine if it is height balanced. For this problem, a height ba
阅读全文
摘要:题目链接 "https://leetcode.com/problems/convert sorted list to binary search tree/" 题目原文 Given a singly linked list where elements are sorted in ascending
阅读全文
摘要:题目链接 "https://leetcode.com/problems/convert sorted array to binary search tree/" 题目原文 Given an array where elements are sorted in ascending order, con
阅读全文
摘要:题目链接 "https://leetcode.com/problems/binary tree level order traversal ii/" 题目原文 Given a binary tree, return the bottom up level order traversal of its
阅读全文
摘要:题目链接 "https://leetcode.com/problems/construct binary tree from inorder and postorder traversal/" 题目原文 Given inorder and postorder traversal of a tree,
阅读全文
摘要:题目链接 "https://leetcode.com/problems/construct binary tree from preorder and inorder traversal/" 题目原文 Given preorder and inorder traversal of a tree, c
阅读全文
摘要:题目链接 "https://leetcode.com/problems/maximum depth of binary tree/" 题目原文 Given a binary tree, find its maximum depth. The maximum depth is the number o
阅读全文
摘要:题目链接 "https://leetcode.com/problems/binary tree zigzag level order traversal/" 题目原文 Given a binary tree, return the zigzag level order traversal of it
阅读全文
摘要:题目链接 "https://leetcode.com/problems/binary tree level order traversal/" 题目原文 Given a binary tree, return the level order traversal of its nodes' value
阅读全文
摘要:题目链接 "https://leetcode.com/problems/symmetric tree/" 题目原文 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center
阅读全文
摘要:题目链接 "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
阅读全文
摘要:题目链接 "https://leetcode.com/problems/recover binary search tree/" 题目原文 Two elements of a binary search tree (BST) are swapped by mistake. Recover the t
阅读全文
摘要:题目链接 "https://leetcode.com/problems/validate binary search tree/" 题目原文 Given a binary tree, determine if it is a valid binary search tree (BST). Assum
阅读全文
摘要:题目链接 "https://leetcode.com/problems/interleaving string/" 题目原文 Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For examp
阅读全文
摘要:题目链接 "https://leetcode.com/problems/unique binary search trees/" 题目原文 Given n, how many structurally unique BST's (binary search trees) that store val
阅读全文
摘要:题目链接 "https://leetcode.com/problems/unique binary search trees ii/" 题目原文 Given n, generate all structurally unique BST's (binary search trees) that st
阅读全文

浙公网安备 33010602011771号