Find 4 countries directly connected which can get max money?
Given list of countries & money located -
Countries connected
Germany - USA
USA - UK
Germany - Spain
UAE - Ireland
Ireland - UK
M connection
Return max money can be collected for 4 countries.
How do you solve this?