# Permutation

04

Sep

2

Handshakes question

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

14

Jun

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 there will not work if we have repetitions in the array. Today’s post is to write the code to print all permutations and takes care of the case if there […]

12

Jun

1

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 2 3 1 3 2 2 1 3 2 3 1 3 1 2 3 2 1