Server Investment

Asked at Snowflake · Coding Questions · Difficulty: Medium

A network security administrator must protect networks at a number of locations from cyber-attacks. Initially, the \(i\) th network has `num_servers[i]` servers, and `money[i]` funds allocated for security upgrades. To upgrade a server in the \(i\) th network, it costs `upgrade[i]`. Selling a server adds `sell[i]` to available funds.

Loading the problem…