Amazon Interview Question

maximum subset problem