Charlie Health Interview Question

Medium hard coding question in LC