Leetcode: 01 Two Sum [golang, 2021]
This is the solution to Leetcode question 1: Two Sum using Golang.
#johncodes
š SUMMARY:
Leetcode two sum can be solved trivially with a brute force using two iterations of the numbers array. The more elegant solution is to use a hashmap to store the complimentary number when iterating the slice.
š SOCIAL LINKS:
āŗ Mastodon: https://fosstodon.org/@johnmcbride
āŗ Home page: https://johncodes.com
āŗ Email contact: [email protected]
šµ MUSIC CREDITS:
āŗ Outset island: Legend of Zelda – Wind Waker
š¤ About:
Hi all, Iām John, an experienced software engineer and open source software enthusiast / contributor. I make fun and informative videos about tech, engineering, productivity, and life! Like, comment, and subscribe for more!
Comments are closed.