Combinatorics
Counting the ways…
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Combinatorics
Counting the ways…
Identical items into distinct bins. Line the items up as stars, split them with k − 1 bars, and every distribution becomes a row — so the count is a single binomial coefficient.
Five identical cookies, three kids. Only how many each kid gets matters — the cookies cannot be told apart. Kid 1 gets 2, kid 2 gets 1, kid 3 gets 2: draw it as 5 stars split by 2 bars, **|*|**.