2020年5月3日

摘要: 地址 https://leetcode-cn.com/problems/assign-cookies/ 假设你是一位很棒的家长,想要给你的孩子们一些小饼干。但是,每个孩子最多只能给一块饼干。对每个孩子 i ,都有一个胃口值 gi ,这是能让孩子们满足胃口的饼干的最小尺寸;并且每块饼干 j ,都有一个 阅读全文
posted @ 2020-05-03 23:09 itdef 阅读(150) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/is-subsequence/ 给定字符串 s 和 t ,判断 s 是否为 t 的子序列。 你可以认为 s 和 t 中仅包含英文小写字母。字符串 t 可能会很长(长度 ~= 500,000),而 s 是个短字符串(长度 <=10 阅读全文
posted @ 2020-05-03 21:27 itdef 阅读(304) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/lemonade-change/ 在柠檬水摊上,每一杯柠檬水的售价为 5 美元。 顾客排队购买你的产品,(按账单 bills 支付的顺序)一次购买一杯。 每位顾客只买一杯柠檬水,然后向你付 5 美元、10 美元或 20 美元。你 阅读全文
posted @ 2020-05-03 15:29 itdef 阅读(247) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/maximum-subarray/ 给定一个整数数组 nums ,找到一个具有最大和的连续子数组(子数组最少包含一个元素),返回其最大和。 示例: 输入: [-2,1,-3,4,-1,2,1,-5,4], 输出: 6 解释: 连 阅读全文
posted @ 2020-05-03 14:31 itdef 阅读(142) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/sparse-similarity-lcci/ 两个(具有不同单词的)文档的交集(intersection)中元素的个数除以并集(union)中元素的个数,就是这两个文档的相似度。例如,{1, 5, 3} 和 {1, 7, 2, 阅读全文
posted @ 2020-05-03 11:26 itdef 阅读(427) 评论(0) 推荐(0)

导航