随笔分类 - leetcode
摘要:1.题目描述 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considere...
阅读全文
摘要:1.题目描述 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example...
阅读全文
摘要:1.题目描述 Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may ass...
阅读全文
摘要:1.题目描述 Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from lea...
阅读全文
摘要:1.题目描述 Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 2.解法分析 ...
阅读全文
摘要:1.题目描述 Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. ...
阅读全文
摘要:1.题目描述 Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree i...
阅读全文
摘要:1.题目描述 Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest p...
阅读全文
摘要:1.题目描述 Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For...
阅读全文
摘要:1.题目描述 Given a binary tree, flatten it to a linked list in-place. For example, Given ...
阅读全文
摘要:1.题目描述Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, &
阅读全文
摘要:1.题目描述 Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tree could be any b...
阅读全文
摘要:1.题目描述 Given a binary tree struct TreeLinkNode { TreeLinkNode *left; ...
阅读全文
摘要:1.题目描述 Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Retu...
阅读全文
摘要:1.题目描述 Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return ...
阅读全文
摘要:1.题目描述 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. ...
阅读全文
摘要:1.题目描述 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorith...
阅读全文
摘要:1.题目描述: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorit...
阅读全文
摘要:1.题目描述 Say you have an array for which the ith element is the price of a given stock on day i. If you were only p...
阅读全文
摘要:1.题目说明 Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. ...
阅读全文

浙公网安备 33010602011771号