News for hackers. Stuff that matters.

dottomato

Re:LeetCode Two Sum on Sunday February 28, 2021 @02:18PM (#26296183)
Actually your C++ solutions is O(N log N) since you are using `std::map`. If you need to remove that extra log factor what you need to use is `std::unordered_map`

std::map::find - http://www.cplusplus.com/reference/map/map/find/

std::unordered_map::find - http://www.cplusplus.com/reference/unordered_map/unordered_m...

Your Golang soln is O(N) still, since maps in Go lang are hashmaps.

dottomato

Re:Tools I use to protect my privacy online on Sunday February 28, 2021 @02:10PM (#26296109)
I recently read an article about privacy respecting browsers here: https://unixsheikh.com/articles/choose-your-browser-carefull...