Handshakes question

At a party, everyone shook hands with everybody else. There were 66 handshakes. How many people were there at the party?

Permutations of list of elements with repeated values

This question is a variation of a question which I posted earlier “Print Permutations of an Array or String“. The code which I had written […]

Permutations of a String or Array

Print all possible permutations of an Array or a String. For Example: If the array is arr={1, 2, 3}. Then the possible permutations are: 1 […]