Actually, for most things (not PHD research level) you will learn more from the first approach. Getting answer directly means you can use the rest of the "free" time to integrate new knowledge into prior knowledge and review the information into long term memory.