+ 6

A c++ program to show all meaningful permutations and combination of word???

7th Mar 2017, 12:49 PM
M G
M G - avatar
2 Answers
+ 18
Ther is standart library for that. it have next_permutation method But about meaningful... Just check it in dictionary
8th Mar 2017, 5:24 AM
WittyBit
WittyBit - avatar
+ 11
Now this is interesting. Cross swapping the characters in a string to form a new string is easy, but how are we supposed to evaluate if the word is meaningful or not? I can surely hook the program up with a dictionary, but the array size needed to store all the information would be too big and inefficient. I'd like to hear out on how others would counter this problem.
7th Mar 2017, 12:58 PM
Hatsy Rei
Hatsy Rei - avatar