LCS is an algorithm to find the Longest Common Subsequence between two Strings. for example, we can use this simple algorithm to find the most similar DNA to that of human or compare DNAs to find a match.(yeah i know thats cool :D)
it's very simple.
- Download or copy the code from LCS.cpp
- Paste the copied code into you IDE (DevC++ or Visual Studio Community and etc.)
- Run the code :)
- Download and save the file
- Open your terminal and dir to your directory where the LSC.cpp is saved
- Type: gcc LSC.cpp
- After that, run a.exe file (actually gcc compiles the file and return an executable file so you can run it.)
You can see what's happening to your data and how we manage to get to the output we need!