See the concept explained in the following video.