Medium Problemssubsetoptimizationlinear

Largest Divisible Subset

Given a set of distinct positive integers, find the largest subset in which, for every pair of chosen numbers, the smaller one divides the larger one evenly.

Do this lesson first: house robber

The full breakdown and animated table for this problem are still being written. In the meantime, run the four questions on it yourself — that is the whole exercise.