asto18089
asto18089
全部文章
分类
题解(10)
归档
标签
去牛客网
登录
/
注册
asto18089的博客
全部文章
(共2篇)
题解 | #数组中的最长连续子序列#
Priority Queue yyds # # max increasing subsequence # @param arr int整型一维数组 the array # @return int整型 # import heapq class Solution: def MLS(self , ...
Python3
2021-10-12
0
309
题解 | #接雨水问题#
随便乱打的,懒得优化了。花了大概40多分钟吧,我在算法上属实是极不擅长。 这方法是O(n)时间是O(1)空间没错,不过还是可以更快一些的,可以找个变量存储一下局部最高值,这样可以省去回扫的时间 # # max water # @param arr int整型一维数组 the array # @ret...
Python3
2021-10-12
0
393