Writing code is not about remembering algorithms. Its about finding the most efficient way to perform a task. If someone on SO has a good solution, use it. Good doctors and engineers consult reference material to come up with the best course of action in any situation. Like a3voices said... Build real world projects. Familiarize yourself with the concepts of business such as inventory, transaction and event managemen…
What you say is true, but it's not either/or. Knowing how to implement something besides quicksort is important as well - the algorithms matter because they represent paths to efficiency. How can you judge what a good solution on SO even is unless you understand what you're looking at at more than a superficial level?