HealthEdge Software interview question

Comparable and comparator, two sum problem