Given an integer N as input, the task is to print the all the string combination from it in lexicographical order.
Input : 191 Output : aia sa Explanation: The Possible String digit are 1, 9 and 1 --> aia 19 and 1 --> sa Input : 1119 Output : aaai aas aki kai ks
- Get the String and find all its combination list in the given order.
- Find the list whose integers lies in the range of 0 to 25.
- Convert the integers to the alphabets.
- Sort it in lexicographical order.
aia sa aiia sia aecb ocb aaia asa kia
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Permutation and Combination in Python
- Python | All possible N combination tuples
- Python - All possible items combination dictionary
- Python Program to Print Numbers in an Interval
- Python program to print all even numbers in a range
- How to print Odia Characters and Numbers using Python?
- Python program to print all odd numbers in a range
- Python program to print even numbers in a list
- Python program to print odd numbers in a List
- Python - Dictionary values combination of size K
- Python | Extract Combination Mapping in two lists
- Print all subsequences of a string in Python
- Python program to print positive numbers in a list
- Python program to print negative numbers in a list
- Python program to print all negative numbers in a range
- Python program to print all Strong numbers in given list
- Python program to print all Prime numbers in an Interval
- Python program to print all positive numbers in a range
- Python - Smallest integer possible from combination of list elements
- Python Program to print all permutations of a given string
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.