Funding Societies Interview Question

Algorithms and pseudo code