WhiteBox
DSA
Start coding DSA Beyond LeetCode System Design AI Engineering White Room
RoadmapProblem sets
Quizzes Dan Ladder Contests Templates Graph Editor
Guides Library
Login Sign up
Sign up Log in

Workspaces

Start coding DSA Beyond LeetCode System Design AI Engineering White Room

DSA

Overview Roadmap Problem sets Quizzes Dan Ladder Contests Templates Graph Editor CP Guessr

Library

Library Guides

Community

Leaderboard Contributors Refer & Earn Cosmetics

Tools

Resume Reviewer Job Boards Changelog

Basics 0/103

DSA 0 of 360 problems solved
0%
Overview

Curriculum

    1. Loops and simulation 0/17
    2. Time complexity 0/5
    3. Arrays 0/8
    4. Strings 0/7
    5. Stacks and queues 0/8
    6. Complete search 0/29
    7. Recursion 0/13
    8. Sorting and selection 0/10
    9. Advanced
    10. Modular arithmetic 0/7
      1. Modular arithmetic basics 0/4
      2. Combinatorics 0/3
  1. DSA
  2. / Basics

Modular arithmetic · 2 of 2 Advanced

Combinatorics

Compute binomial coefficients with Pascal's rule, and modulo a prime with factorial and inverse-factorial tables.

1,563 words · 7 min read

Lesson Problems3 Reading5

Books1

  • Competitive Programmer’s Handbook, Section 22.1 The binomial formula and its properties, from Pascal’s triangle to multinomial coefficients. (opens in a new tab)

Links2

  • usaco.guide Combinatorics Binomial coefficients by Pascal’s triangle and by precomputed factorials, then derangements, stars and bars and expected value, with practice problems. usaco.guide (opens in a new tab)
  • cp-algorithms.com Binomial Coefficients Pascal’s triangle, the factorial formula with precomputed inverse factorials as in this lesson, and what to do when the modulus is not prime. cp-algorithms.com (opens in a new tab)

More links2

  • Stars and Bars — CP-Algorithmscp-algorithms.com (opens in a new tab)
  • CP-Algorithms – Catalan Numberscp-algorithms.com (opens in a new tab)
Lesson: Combinatorics
Overview Roadmap Problem sets Log in