
Introduction
Puzzles are good exercise for the brain. They help in enhancing the cognitive abilities of the brain helping with Problem Solving and related skills. There are numerous types of puzzles; each one having a logic inherent to itself which helps in cracking it. A good puzzle well is actually like a good mystery that we may have read about or watched on TV. It has the finest of hints which help in reaching its solution.
The following article discusses one such puzzle so let's get right to it.
Puzzle Statement
A hollow diamond number pattern prints a pattern of numbers that resembles the structure of a diamond that is hollow from within. Consider the below-given picture. The picture below is a hollow star diamond pattern because stars form the hollow diamond structure.

If we replace the asterisks(the star symbols) printed in the above pattern with numbers, we can call it a hollow diamond number pattern. For example, if we consider the image given below.

Explanation
The correct approach to printing the desired pattern would be to divide the entire pattern into two halves- upper and lower. The lower half is the exact replica of the upper half, just turned upside down. So firstly to divide into two halves, we first calculate a point till which the first half of the pattern will be printed, by having a control variable which is the median point.