It can be better to copy a little code than to pull in a big library for one function. Dependency hygiene trumps code reuse.
Data dominates. If you’ve chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming.