Find minimum reversals to orient edges away from root | Uber Interview Question