Write a recursive method that returns the total number of


Solve the following problem recursively.

Suppose that there are n people in a room where n >= 1. As each person initially entered the room they shook hands with all the people in the room once. Write a recursive method that returns the total number of handshakes that took place in a room with n people. For example, Handshake(1) must be 0. Handshake(2) will be 1. Handshake(3) will be 3 (when the third person entered the room they shook hands with the 2 people there already, as well there was a total of 1 handshake before that)

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a recursive method that returns the total number of
Reference No:- TGS0645102

Expected delivery within 24 Hours