- 博客(6)
- 收藏
- 关注
原创 Leetcode 刷题
本文章基于Datewhale第30期组队学习2021.11.15 # 1 两数之和# 给定一个整数数组 nums 和一个整数目标值 target,# 请你在该数组中找出和为目标值 target 的那两个整数,并返回它们的数组下标。# 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素在答案里不能重复出现 # 1.两层 for 循环 暴解 O(n^2)class Solution: def twoSum(self, nums: List[int], target
2021-11-15 21:44:30
1089
3
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人