Leetcode: 01 Two Sum [golang, 2021]



Leetcode: 01 Two Sum [golang, 2021]

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.