07 2020 档案

买卖股票的最佳时机 II(122)
摘要:法一:class Solution: def maxProfit(self, prices: List[int]) -> int: ret = 0 for i in range(len(prices)): if i+1<len(prices): if prices[i]<prices[i+1]: r 阅读全文

posted @ 2020-07-31 11:27 不要挡着我晒太阳 阅读(169) 评论(0) 推荐(0) 编辑

最长公共前缀(14)
摘要:法一:class Solution: def longestCommonPrefix(self, strs: List[str]) -> str: if not strs: return '' str_min = min(strs) str_max = max(strs) for i in rang 阅读全文

posted @ 2020-07-30 11:32 不要挡着我晒太阳 阅读(89) 评论(0) 推荐(0) 编辑

两个数组的交集II(350)
摘要:法一:def intersect(nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ ans = [] nums1.sort() nums2.sort() i = j = 0 w 阅读全文

posted @ 2020-07-29 14:22 不要挡着我晒太阳 阅读(130) 评论(0) 推荐(0) 编辑

Django 性能之数据库查询优化
摘要:1. DBA 的建议 1.1 表字段设计 避免出现 null 值,null 值难以查询优化且占用额外的索引空间 尽量使用 INT 而非 BIGINT,尽可能准确描述字段 使用枚举或整数,替代字符串类型 使用 TIMESTAMP 替代 DATETIME 单表字段不要超过 20 使用整型存储 IP 1. 阅读全文

posted @ 2020-07-16 14:08 不要挡着我晒太阳 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示