1259. Handshakes That Don't Cross

Problem

Count the number of ways 2n people seated in a circle can shake hands without crossings.

There are 2n people seated around a circular table. Each person wants to shake hands with one other person, but no two handshakes can cross each other. Count the number of valid ways to form non-crossing handshakes.

This is equivalent to counting the number of ways to match 2n points on a circle with non-crossing chords.

Examples
Input: 2
Output: 1
Hints
Related Problems

1259. Handshakes That Don't Cross

Count the number of ways 2n people seated in a circle can shake hands without crossings.