Often neither.
The best outcomes seem to emerge from nowhere. A psychologist might call that “nowhere” the subconscious. A Buddhist might say that it is resolved in the Void. A Christian might say that God provided the answer. Maybe the most accurate way to put it is that it comes from I-don’t-know-where.
The process goes something like this: I immerse myself in the problem at hand, considering all of the factors, possible outcomes (the “head” stuff), as well as how I feel about the situation and the various possible outcomes (the “heart” stuff). This often leads me to an impasse, where I really can’t see the way forward. That’s the threshold of the Void. It’s as if all of those thoughts and feelings fade out, leaving a big, open question mark in their place.
At that point, it’s important not to become desperate for an answer. I just turn the matter over to that open emptiness. I’ve seen how this functions enough to have trust in the process. On its own time schedule, the resolution emerges without me having anything to do with it. I just “get it”, and understand the rightness of it. The rest is refinement and action.
Einstein insisted that this was how it worked for him, too: “The intellect has little to do on the road to discovery. There comes a leap in consciousness, call it Intuition or what you will, the solution comes to you and you don’t know how or why.”