Answer:
Genetic drift
Step-by-step explanation:
Genetic drift is the mechanism which is characterised by the change in the allele frequency of a small population. The process is random that is the process is not controlled but happen by chances.
The frequency of the allele changes due to some chances which can cause or force the allele to change over time. The process is observed in the small population only.
In the given question, since the organisms share a habitat but different niche therefore the genetic variation is the result of the random events which caused the allele to change.
Thus, Genetic drift is the correct answer.