But OP said he ended up somewhere sensible. He -was- thinking about the problem at hand. As he spoke. He got there in a roundabout fashion, perhaps, and had to think quickly, but it's still -valid-. He's not just bullshitting the interviewer (which is very noticeable and easy to suss out, and never ends anywhere sensible).
The right thing to do is to narrate what you're thinking about. It's very different than starting a sentence without knowing what you're going to say.