There's no explanation of why someone thought that link had an answer to my question.
The explanation is always the same: because the person or people who voted for that link, believe they understand the underlying problem in your code example, understand the Q&A at the link, and recognize that the problem matches the Q and the solution matches the A.
How would they know that I have the necessary knowledge to understand whether the link has that knowledge or not?
They wouldn't. This is also irrelevant. Since Stack Overflow is not a discussion forum, the purpose of questions is not to help the person who asked out of a jam, but to build a searchable knowledge base.
Repeated questions motivated by the same underlying problem, with the same solution, do not add knowledge to the knowledge base.
When someone finds a question like this with a search engine, we want to direct them to the "canonical" duplicate, where we have focused our effort on providing the highest-quality version of the question and answers. Thus, we close questions as duplicates, which puts a link right there in everyone's face, and prevents users from putting new answers in the wrong place.
When we fail to close questions as duplicates, someone who finds the new question may end up confused because the duplicate question is a) not clear or explicit; b) not focused specifically on the problem; and/or c) not previously subjected to years of random editors stopping by and contributing minor improvements. Thus, the duplicate isn't just taking up space, but can worsen the presentation of the knowledge.
Shouldn't they at least justify why they think the link has some connection to my problem?
This is a nice courtesy in many cases, but not at all required by site policy. Stack Overflow is about the questions, not the users.
We try to tailor the writing in each Q&A to the apparent essential difficulty of the material; that is, we want to give a basic, easily-understood explanation for problems that beginners will commonly encounter, not because a beginner asked (in fact, it will often be better if an expert asks), but because the question will be searched for by beginners.
list
containing items in a specific order.bisect
implements an algorithm that commonly works on orderedlist
s...