add non-recursive implementation for string full arrangement