Medtronic Interview Question

Coding question was been asked