Leetcode: 01 Two Sum [golang, 2021]

preview_player
Показать описание

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.

🎵 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!
Рекомендации по теме
Комментарии
Автор

Thanks for watching all! Let me know what problems you want covered in the future!!

JohnCodes
Автор

Great presentation, I hope you'll keep making these and focus on more difficult and practical problems. Algorithms and optimisation in Go overall are great topics!

sm
Автор

Thank you so much :) I reloaded the video 4 times to watch the ads for you

typecek
Автор

Very well done. How did you write/blackboard? That was a great way to sketch ideas.

SheldonHull
Автор

what difference between
left range and right range in loop 
?

AinurDossan
Автор

bro could you please continue this series?

mrudulmohan
Автор

Previous solution - 56 ms but still less memory. Wonder how this solution looks like :)

dmitriyobidin
Автор

bro could you please continue this series?

superuser
welcome to shbcf.ru