• + 0 comments

    Swift Solution:

    func handshake(n: Int) -> Int {
        return n*(n-1)/2
    }