Someone please help me on PERCAPTA

Here in that Question we will have to only select the the cities with high per capita income and if dfs possible then try to reach there if no then stop .
Is it give me true result.

Yes you need to find the city with the highest per capita value and then apply dfs on those cities and your answer would the largest connected component

like if
1 and 5 cities connected
but here also 2,3 and 4 are connected with same per capita income then we have to select second one


are u submitted the code


Constant practice, participating in contests will surely help you :slight_smile:

or maybe working on your english skills :stuck_out_tongue:

1 Like

Talent has no language :+1: