摘要: 1.最大子序和 给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。 示例: 输入: [-2,1,-3,4,-1,2,1,-5,4] 输出: 6 解释: 连续子数组 [4,-1,2,1] 的和最大,为 6。 进阶: 如果你已经实现复杂度为 O(n) 阅读全文
posted @ 2020-09-30 19:09 ~快乐王子~ 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 爬取百度贴吧数据(Python) 1.总代码: from urllib.request import Request, urlopen from urllib.parse import quote def get_html(html): headers = { "User-Agent": "Mozi 阅读全文
posted @ 2020-09-30 19:07 ~快乐王子~ 阅读(1112) 评论(0) 推荐(0) 编辑