Maximize path score in DAG | Airbnb Interview Question