According to Investopedia, gaps are defined as:
Spaces on a chart that emerge when the price of the financial instrument significantly changes with little or no trading in-between.
Considering this definition, I guess that we should look for positions where no trading has happened. Therefore, the following is definitely a gap:
However, I have seen that in some tutorials that the price candle which is connected to the past candle by its shadow is also considered a gap. For example, in the below chart, the last candle is marked as a gap by a tutor.
Is it correct to think of this candle as a gap? I think that it is not a gap because the shadow has filled the gap between the last candle and the previous one.