← Infosys questions
CodingEasy

Maximum Number of Cities Can Be Visited

Filed under Infosys

Given N cities and N-1 bi-directional roads forming a tree structure, along with M devils residing in specific cities which cannot be visited, find the maximum number of cities that can be visited…

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.