Infosys 2025-December | CP | Strongly Connected Components | On-campus

Infosys · Question · Posted Jun 2026

Question 1: Flight Routes Check Problem Statement There are N cities and M one-way flight routes. Your task is to check if it is possible to travel from ANY city to ANY OTHER city using the available flights. If it is possible, print YES. If it is not possible, print NO and print the IDs of two cities A and B such that you CANNOT travel from city A to city B. Input Format The first line has two integers ...

The full answer & interview discussion are available to premium members.

Log in Create a free account