摘要: 给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。(一个也不会,难受) class Solution(object): def maxSubArray1(self, nums): """ :type nums: List[int] :rtype: 阅读全文
posted @ 2021-01-28 15:04 楠海 阅读(63) 评论(0) 推荐(0)
摘要: 给定一个罗马数字,转为整数(都是我写的,我很开心,如果我不思考这个问题看起来很难,但是当我思考了他就变得不是那么难) class Solution(object): data_dict = {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, 阅读全文
posted @ 2021-01-28 10:16 楠海 阅读(61) 评论(0) 推荐(0)