Tap here to switch tabs
Problem
Submissions

Problem: Handshakes That Don't Cross

med
30 min
Try to solve the Handshakes That Don't Cross problem.

Statement

You are given an even integer numPeople representing the number of individuals standing around a circular table. Each person must shake hands with exactly one other person such that no handshakes cross.

Return the total number of valid ways to arrange these handshakes. Since the answer may be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 2≤2 \le numPeople ≤1000\le 1000

  • numPeople is even.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Handshakes That Don't Cross

med
30 min
Try to solve the Handshakes That Don't Cross problem.

Statement

You are given an even integer numPeople representing the number of individuals standing around a circular table. Each person must shake hands with exactly one other person such that no handshakes cross.

Return the total number of valid ways to arrange these handshakes. Since the answer may be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 2≤2 \le numPeople ≤1000\le 1000

  • numPeople is even.