![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
作业
guoyzh7
这个作者很懒,什么都没留下…
展开
-
Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i转载 2017-02-23 17:22:12 · 135 阅读 · 0 评论 -
494. Target Sum
You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.Find out转载 2017-05-22 13:09:51 · 178 阅读 · 0 评论 -
516. Longest Palindromic Subsequence
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000.Example 1:Input:"bbbab"Output:4One possible longest palind转载 2017-05-15 14:24:44 · 137 阅读 · 0 评论 -
513. Find Bottom Left Tree Value
层序遍历,保存每层的第一个值,最后的即为所求值。class Solution {public: int findBottomLeftValue(TreeNode* root) { int result = root->val; queue q; q.push(root); TreeNode* temp;转载 2017-04-24 18:12:54 · 141 阅读 · 0 评论 -
515. Find Largest Value in Each Tree Row
You need to find the largest value in each row of a binary tree.Example:Input: 1 / \ 3 2 / \ \ 5 3 9 Output: [1, 3, 9]题目的意思很简洁明了,就是找出树的每转载 2017-04-16 21:44:31 · 189 阅读 · 0 评论 -
508. Most Frequent Subtree Sum
Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all the node values formed by the subtree rooted at that node (includi转载 2017-05-01 13:02:56 · 197 阅读 · 0 评论 -
503. Next Greater Element II
Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The Next Greater Number of a number x is the first gre转载 2017-03-27 14:35:32 · 160 阅读 · 0 评论 -
496. Next Greater Element I
You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums转载 2017-03-27 14:02:47 · 161 阅读 · 0 评论 -
241. Different Ways to Add Parentheses
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are +, - and *.Example 1转载 2017-03-05 22:17:08 · 121 阅读 · 0 评论 -
350. Intersection of Two Arrays II
Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2].Note:Each element in the result should appear as many times as it shows in both arrays.The result can be in any order.转载 2017-06-12 19:57:57 · 104 阅读 · 0 评论