MediBuddy interview question

In coding round DP , tree , graph