</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

03

:

08

:

58

Get this deal
Back to Dashboard

OA [CodeSignal] Minimum Edge Reversal Root

Hard

Given a directed graph (represented as a tree with directed edges), choose a root node such that the minimum number of edges must be reversed so that all edges point away from the root.

Return the best root node (any valid one if multiple exist). ...