Minimum Network Cost - Coding problem | OneNoughtOne