Epic Interview Question

Create an algorithm that generates every possible combination that a group of letters can be organized into. For example: abc abc, acb, bac, bca...