Supposing that we have a string not in the classic form but in a form like that A1B1C1D2E1G1F1 A1B1C1D2F1P1X1
where the numbers are the frequencies of chars.
How can i work the longest common subsequence? I have worked with arrays of struct but i find some difficulty. Can someone provide code for the LCS part working also with frequencies?