Status: IN
Sorting `nums` ascending and taking smallest elements first guarantees maximum count under any sum budget; this greedy choice is optimal because swapping a larger element for a smaller one never decreases remaining capacity.
Source: entries/2026/06/06/longest-subsequence-with-limited-sum-solution.md