![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
刷题
LeetCode、剑指offer
闪电蛙
生命不息,奋斗不止!
个人博客:http://www.cloverhk.top,欢迎各位多多指教。
展开
-
LeetCode:判定字符是否唯一
题目:实现一个算法,确定一个字符串 s 的所有字符是否全都不同。示例 1:输入: s = "leetcode"输出: false 示例 2:输入: s = "abc"输出: true限制:0 <= len(s) <= 100如果你不使用额外的数据结构,会很加分。来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/is-unique-lcci著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。.原创 2020-10-29 18:38:58 · 186 阅读 · 0 评论 -
LeetCode:两数之和
题目:给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。示例:给定 nums = [2, 7, 11, 15], target = 9因为 nums[0] + nums[1] = 2 + 7 = 9所以返回 [0, 1]来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/two-sum著.原创 2020-10-26 13:48:55 · 72 阅读 · 0 评论