What is l-diversity, and which attack was it specifically designed to stop?
l-diversity requires each equivalence class to contain at least L distinct values for the sensitive attribute — defeating the homogeneity attack.
Where k-anonymity controls the quasi-identifiers, l-diversity adds a constraint on the sensitive attribute itself: within every equivalence class there must be at least L "well-represented" different values, so no single sensitive value dominates.
Concretely, if a class ([25–30], Asia) contains Cardiac, Cancer, Infectious, an attacker who locates someone in that class still can't conclude the diagnosis — there's genuine diversity. If instead all three records said Cancer, l-diversity is violated and the homogeneity attack succeeds.
Tip: k-anonymity is about the group size; l-diversity is about the variety of secrets within the group. You need both.
Go deeper:
l-diversity (Wikipedia) — definition plus distinct/entropy/recursive variants.