Minimize Direction Violations in a Directed Road Network

Quick Overview

Find a route through a directed road network that minimizes travel against the original edge directions. Model forward and reverse traversal costs correctly, handle parallel edges and disconnected nodes, and choose a shortest-path approach that scales to hundreds of thousands of vertices and edges.

Minimize Direction Violations in a Directed Road Network

Company: Google

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Find a route through a directed road network that minimizes travel against the original edge directions. Model forward and reverse traversal costs correctly, handle parallel edges and disconnected nodes, and choose a shortest-path approach that scales to hundreds of thousands of vertices and edges.

|Home/Coding & Algorithms/Google
Google logo
Google
Jul 5, 2026
mediumSoftware EngineerOnsiteCoding & Algorithms
60
0
Loading...

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...