PerceptiMed interview question

Various algorithms and complexities.