create program in c for permutation combination and showing frequency
Posted
by Vishal Oswal
on Stack Overflow
See other posts from Stack Overflow
or by Vishal Oswal
Published on 2010-04-26T19:19:15Z
Indexed on
2010/04/26
19:23 UTC
Read the original article
Hit count: 293
I have 2 strings where I have saved fixed 20 characters and these are “A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T” and same 20 char in string 2. so I will get 400 combinations of 2 character sets like
AA,AB,AC,AD,AE,AF,……………AT
BA,BB,BC,BD,BE,BF,…………..BT
CA,CB,CC,CD,CE,CF……………CT
This way we will get 400 combinations (Which program I have created successfully) but then user will put the value till 31 characters witch will be treated as 3rd string for E.g. “ABCDDAAAB” now I have to check the frequency of user input in the sequence of 12,23,34,45,56,67,78,89 (2 CHAR SET) means AB,BC,CD,DD,DA,AA,AA,AB and need to show the frequency of user input
OUTPUT:
AB=2 BC=1 CD=1 DD=1 DA=1 AA=2
please its urgent
© Stack Overflow or respective owner