More generally, the problem can be stated as follows:

If you have n posts, how many sections are there between them?

The correct answer may be n − 1 if the line of posts is open-ended, n if they form a loop, or n + 1 if the posts do not occur at the end of the fence (for instance if the fence runs between two walls).

I don't understand the emboldened sentence. Can someone please illustrate it?


closed as off-topic by Jimmy R., Shailesh, blub, Cesareo, José Carlos Santos Apr 13 at 12:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Jimmy R., Shailesh, blub, Cesareo, José Carlos Santos
If this question can be reworded to fit the rules in the help center, please edit the question.


Let $S_j$ denote section $j$ and $P_k$ denote post $k$. We can illustrate your question in the following way:

$$ S_1 \quad \color{red}{P_1} \quad S_2 \quad \color{red}{P_2} \quad S_3 \quad \color{red}{P_3} \quad S_4 \quad \ldots \quad S_n \quad \color{red}{P_n} \quad S_{n+1} $$


Not the answer you're looking for? Browse other questions tagged or ask your own question.