摘要: 力扣链接:https://leetcode-cn.com/problems/he-wei-sde-lian-xu-zheng-shu-xu-lie-lcof/ 题目描述 输入一个正整数 target ,输出所有和为 target 的连续正整数序列(至少含有两个数)。 序列内的数字由小到大排列,不同序 阅读全文
posted @ 2020-07-13 23:02 studystudyxinxin 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 力扣链接:https://leetcode-cn.com/problems/he-wei-sde-liang-ge-shu-zi-lcof/ 题目描述 输入一个递增排序的数组和一个数字s,在数组中查找两个数,使得它们的和正好是s。如果有多对数字的和等于s,则输出任意一对即可。 思路1: 哈希表 先建 阅读全文
posted @ 2020-07-13 22:06 studystudyxinxin 阅读(125) 评论(0) 推荐(0) 编辑