MAXVY interview question

completely based on digital electronics