Closed mJackie closed 5 years ago
First of all, thank you for the contribution. Please follow this template to make a pull request, also here, this is for better code management.
Just wait me few days. I will follow the template and pull request again.
1. Two Sum
难度: Easy
刷题内容
解题方案
暴力解法,两轮遍历
beats 27.6%
上面的思路1太慢了,我们可以牺牲空间换取时间
target - 当前数字
, 则表面 当前值和 lookup中的值加和为 target.target - 当前数字
的 index 和 当前值的 index