I like a lot these kinds of exercises, very nice diagrams and a way to explain it!
Did you know it can be solved with just one frequency map by adding/removing the key? Same O(n), but two-thirds of the operations and half the memory :)
Check (and run) this snippet: play.golang.org/p/ZR5QHwZPAn8
This is only valid because of:
You can assume that there's no duplicate item in any of the lists.
Very cool articles man! 🚀
Thanks mate! Your support is always much appreciated 🙏🏼
You got a point, yeah! Much more performant in time and space indeed.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I like a lot these kinds of exercises, very nice diagrams and a way to explain it!
Did you know it can be solved with just one frequency map by adding/removing the key? Same O(n), but two-thirds of the operations and half the memory :)
Check (and run) this snippet: play.golang.org/p/ZR5QHwZPAn8
This is only valid because of:
Very cool articles man! 🚀
Thanks mate! Your support is always much appreciated 🙏🏼
You got a point, yeah! Much more performant in time and space indeed.