This question pertains to string alignment.
Give a dynamic programming algorithm (time complexity O(nm)) that counts the number of optimal alignments given 2 sequences.
Okay so I'm providing the algorithm/code in c++ with proper comments so that you are able to understand the solution.
But before that I'd like to write where this algorithm is used. It is used in Biology, in order to find the proximity between different (2) amino-acid sequences. The algorithm used for it has seen a lot of progress in terms of space and time complexity, and now we use dynamic programming to solve it.
So, here is the algorithm/code-
MAIN FUNCTION-

FUNCTION CALL-






OUTPUT
-
TIME COMPLEXITY- O(N*M).
This question pertains to string alignment. Give a dynamic programming algorithm (time complexity O(nm)) that counts...