1259. Handshakes That Don't Cross
MathDynamic Programming
Hints
Hint 1
Use dynamic programming.
Hint 2
Let dp[n] be the number of ways that n people can handshake.
Hint 3
Then fix a person as a pivot and turn for every other person who will have a handshake, the answer is the sum of the products of the new two subproblems.
Preparing judge…