Q) You are given a string in which the characters are sorted. Write a
program to generate all the combinations of characters such that only
the lexicographically lowest permutation of every combination is
printed. (ie. If the string is "abcd" then "ab" is a valid
combination, but "ba" is not). Further, the combinations generated
must themselves be in dictionary order.

Example:
For the string "ABC", the combinations are:
A
AB
ABC
AC
B
BC
C
You may write the output to standard output.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to