solved 5 problems:

1. sort colors;
2. permutations;
3. next permutation;
4. partition list;
5. triangle.