算法
文章平均质量分 59
Mashirolee
这个作者很懒,什么都没留下…
展开
-
Maximum Binary Tree
题目:Given an integer array with no duplicates. A maximum tree building on this array is defined as follow:The root is the maximum number in the array. The left subtree is the maximum tree constructed fr原创 2017-09-19 17:37:57 · 365 阅读 · 0 评论 -
Two Sum
Two Sum sysu 15331160 李仁杰 此题难度easy,利用两次循环可得,下面贴上代码: class Solution{ public: vector twoSum(vector & nums,int target){ int s = nums.length; for(int i=0;i { for(int j=i+1;j if(nums[i] + num原创 2017-11-29 15:07:16 · 147 阅读 · 0 评论 -
Add Two Numbers
Add Two Numbers sysu 15331160 李仁杰 这道题难度中: 题目意思大概可以理解为倒叙的带进位十进制加法。 两个字串相加分为三种情况: 第一个比第二个长 第一个和第二个一样长 第一个比第二个短 其中设置一个carry 和sum,然后利用循环即可得解 public ListNode addTwoNumbers(ListNode l原创 2017-11-29 16:10:11 · 161 阅读 · 0 评论 -
Big Countries
Big CountriesSubject: +—————–+————+————+————–+—————+ | name | continent | area | population | gdp | +—————–+————+————+————–+—————+ | Afghanistan | Asia原创 2017-09-16 22:11:34 · 282 阅读 · 0 评论