halfrost / LeetCode-Go

✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解
https://books.halfrost.com/leetcode
MIT License
32.76k stars 5.68k forks source link

Update 0001.Two-Sum.md #274

Open pintuming opened 1 year ago

pintuming commented 1 year ago

Improve performance by using the index returned by the map instead of searching from the map again.