← Infosys questions
CodingMedium-HardReported in a candidate post, Jul 2024

Minimum distance of the longest trip after road relocation

Filed under Infosys

Given a connected graph of cities and roads, remove one road and place it elsewhere ensuring the graph remains connected, then find the minimum possible distance of the longest simple path.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Infosys questions

Collected from public candidate posts and coding forums. Updated Nov 2026.