随笔分类 - leecode
leecode exercises
摘要:题目来源 https://leetcode.com/problems/valid-palindrome/ Given a string, determine if it is a palindrome, considering only alphanumeric characters and ign
阅读全文
摘要:题目来源 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
阅读全文
摘要:题目来源 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
阅读全文
摘要:题目来源 https://leetcode.com/problems/pascals-triangle/ Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Re
阅读全文
摘要:题目来源 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
阅读全文
摘要:题目来源 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
阅读全文
摘要:题目来源 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.
阅读全文
摘要:题目来源 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
阅读全文
摘要:题目来源 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
阅读全文
摘要:题目来源 https://leetcode.com/problems/balanced-binary-tree/ Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced
阅读全文
摘要:题目来源 https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ Given a binary tree, return the bottom-up level order traversal of its nodes'
阅读全文
摘要:题目来源 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
阅读全文
摘要:题目来源 https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ Given a binary tree, return the zigzag level order traversal of its nodes
阅读全文
摘要:题目来源 https://leetcode.com/problems/binary-tree-level-order-traversal/ Given a binary tree, return the level order traversal of its nodes' values. (ie,
阅读全文
摘要:题目来源 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 conside
阅读全文
摘要:题目来源 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
阅读全文
摘要:题目来源 https://leetcode.com/problems/binary-tree-inorder-traversal/ iven a binary tree, return the inorder traversal of its nodes' values. For example:G
阅读全文
摘要:题目来源 https://leetcode.com/problems/restore-ip-addresses/ Given a string containing only digits, restore it by returning all possible valid IP address
阅读全文
摘要:题目来源 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
阅读全文

浙公网安备 33010602011771号