If it's a subject area where you have some expertise, and it's still a tricky question for you to fully answer, then it's probably tricky for other people as well. It's helpful to post as much of an answer as you can (or have time to write), if that can hopefully give future readers something to build on, and/or a pointer right direction.
Make it clear that it's not a complete answer. If a reader knows that up front, they can read it with an eye towards building on it. Rather than wondering if they missed something when reading / skimming your answer, if they were expecting (hoping) to find an answer to the complete problem.
If you don't have much experience yourself with the language or subject matter, usually don't post half-answers. Someone who does know the language or problem-domain probably can post a complete answer fairly easily, and a confused beginner answer is likely to just be clutter. Or worse, misleading if your partial solution is a step down a wrong (or over-complicated) path.
I know this isn't the case you talked about in the question, but some commenters have raised objections to partial answers. Those objections are warranted in other cases, where a complete answer isn't hard for experts; Stack Overflow doesn't need everyone's beginner attempt at a problem, or a blog post about their attempts to learn a new language.
It's a judgement call on whether you think other people probably know the answer and are willing / able to write and post one. In this case, you say it's a problem related to one you looked at, so your assessment is likely correct.
@x
to notify one non-sole non-poster commenterx
re a comment. Posters, sole commenters & followers of posts always get notified. But without@
others get no notification.