Rocket Lawyer Interview Question

Min heap and optimization on conditions