Handshake Count
Everyone in a group of people shakes hands exactly once with every other person. Return the total number of handshakes.
Example 1
people 4
returns 6
6 handshakes.
Constraints
0 <= people <= 1000
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More Math problems
- Harshad NumberBeginner
- Hex String to DecimalBeginner
- Highest Power of TwoBeginner
- Is PrimeBeginner
- Lattice Points in a CircleBeginner
- Leap YearBeginner
- Matches in a TournamentBeginner
- Number of Common FactorsBeginner