Handshakes That Don't Cross(LeetCode 1259):

Problem