I apologize for not reading through the other 17 answers before writing mine. I’ll address the two algorithms mentioned in the question: Dijkstra’s algorithm and quicksort.
You need to know the conditions under which you will be running the algorithms.
For Dijkstra, you want to be sure that all the edge weights are nonnegative. A single negative edge weight can produce incorrect results. OK, now that you’ve verified that all the edge weights are nonnegative, what else do you know about them? Are they all equal? Then you can just run breadth-first search instead. Are they all integers in a constrained range? Then you can run Dial’s algorithm, which is really just Dijkstra’s algorithm with a bucket-based min-priority queue.
For quicksort, what do you know about the keys that you’re sorting? Are they all integers in a constrained range? Then maybe you’re better off with counting sort or radix sort. Is the array almost sorted, in the sense that every item is close to where it belongs in the sorted order? Then you might be better off with insertion sort.
You don’t necessarily need to be able to regurgitate the code for any particular algorithm or data structure—yeah, go look it up in CLRS or another source—but you need to know when to apply it. To give an analogy to the tools that I have down in my basement workshop, if I really want to, I can drive a nail with a screwdriver. But that doesn’t mean it’s the best way to do so.