I have two arrays (max 100 characters) that I want to align, and add an "-" when there is disparity I found the Needleman–Wunsch algorithm, which is based on dynamic programming, and the Smith–Waterman algorithm is a general local alignment method also based on dynamic programming but they seems too complex for what I want.
Is there a way do this alignement with a diff algorithm ? If yes can someone point me how to do this.
My program already works with the Needleman algorith and its about 200 lines of code.
Example of desired input/output :
Array 1 : MKNLASREVN
Array 2 : QMASREVNIY
Array 1 (or a simple print) : -MKNLASREVN
Array 2 (or a simple print) : QM---ASREVN
2 Months Ago
Related Article:Keylistener recognize a series of characters
is a Java discussion thread by caswimmer2011 that has 3 replies, was last updated 6 months ago and has been tagged with the keywords: keylistener, characters, netbeans, java, help.