Hackerrank – Handshake

Problem Statement
A description of the problem can be found on Hackerrank.

Solution

    \[handshakes = \sum_{i=0}^{directors-1}{i}\]

I created solution in:

All solutions are also available on my GitHub.

Java

JavaScript

Ruby

Scala