Invesco interview question

Basic Probability and Graph based coding