I came across a question which is indirectly related to a clearly answered questions in Stack Overflow.
Can my answer be a link to that question (all similar questions)?
Meta Stack Exchange is a question and answer site for meta-discussion of the Stack Exchange family of Q&A websites. It only takes a minute to sign up.Sign up to join this community
it is not an exact duplicate of the current question. (If it is, vote to close as duplicate instead.)
it is an essential part of your answer, which is a valid answer to the question. (If it doesn't, add the link as a comment.)
However, never just add a link. Paraphrase what the other answer says, and explain how it is connected to the current problem, and how it can be solved through it.