Skip to main content

UChicago Coding Challenge

There are a surprising number of Chicago neighborhoods that don't have any informal K-12 computer science programs. Given a particular neighborhood, it costs a certain amount of dollars to set up a CS program at a local school, and has a potential to impact students.

Given D amount of dollars in funding, write a function to determine how many students you could impact by setting up CS programs in certain neighborhoods.

Input: int D : Number of dollars in available in funding 

        arr[] : an array of tuples (cost, impact) where the first value is the 

        cost and the second value is the impact of setting up a CS program in 

        that neighborhood. 

Output: The maximal number of students impacted by setting up programs without exceeding our funding amount of D dollars 

Bounds: 0 <= len(arr) ; 0 <= cost ; 0 <= impact 
Submit your solution by September 10, 2020!