Before you startAI-drafted · not yet reviewed by an editor
Counting is about finding how many ways a task can be done without listing every possibility. If one task can be done in ways and a second independent task in ways, doing both gives total ways. Choosing items from distinct items, where order does not matter, uses combinations: inom{n}{k} = rac{n!}{k!(n-k)!}. A set with elements has subsets, since each element is either included or excluded. For paths moving only right or up, every shortest path contains a fixed number of right moves and up moves; count them by choosing which steps go in one direction.
Curated
1| # | Title | Difficulty | Tags | |
|---|---|---|---|---|
| 15 | Two subsets, one sum | Deep |