This u can do it using the backtracking method. To know how to use
backtracking refer algorithm design manual by steve skiena.


On 7 January 2014 03:35, bujji jajala <jajalabu...@gmail.com> wrote:

> generate all possible DISTINCT permutations of a given string with some
> possible repeated characters. Use as minimal memory as possible.
>
> if given string contains n characters in total with m < n distinct
> characters each occuring n_1, n_2, ....n_m times where n_1 + n_2 + ...+ n_m
> = n
>
> program should generate n! / ( n_1! * n_2! * ....* n_m!  )  strings.
>
> Ex:
>  aba  is given string
>
> Output:
>
> aab
> aba
> baa
>
>
> -Thanks,
> Bujji
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to algogeeks+unsubscr...@googlegroups.com.

Reply via email to