Yuj Designs interview question

to explain the design test solution