- 博客(2)
- 收藏
- 关注
原创 leetcode 102.Binary Tree Level Order Traversal
题目Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).代码v1.0代码# Definition for a binary tree node.# class TreeNode(object):# ...
2019-12-01 23:19:00
152
原创 【leetcode】1031 maximum sum of two non overlapping subarrays
题目https://leetcode.com/problems/maximum-sum-of-two-non-overlapping-subarrays给定一个数组A,找到其中不相重合的长为M及L的连续子序列,使两个子序列和最大,返回最大和即可代码v1.0思路(暴力搜索可以想到的优化点):计算出前后向长为n的子序列内max_m, max_l,然后便利找一下前向+后项一起啥时候最大...
2019-12-01 18:05:18
158
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人