sukritishah15 / DS-Algo-Point

This repository contains codes for various data structures and algorithms in C, C++, Java, Python, C#, Go, JavaScript, PHP, Kotlin and Scala
MIT License
951 stars 290 forks source link

*Longest Common Subsequence #715

Open itslinotlie opened 4 years ago

itslinotlie commented 4 years ago

🚀 Feature

The longestcommon subsequence (LCS for short) is a classic dynamic programming question where you have to find the lonest subsequence between two strings (usually). It runs in O(NM) time where n and m are the length of the two strings respectively.

Have you read the Contribution Guidelines?

:+1:

Pitch

This algorithm is a good example to practice dynamic programming with (by understanding transition states) and is a useful concept to know during competitive programming situations as well. I can implement this in both Java and C++ (:

Assigned (Please recheck on the files) @itslinotlie - C++ @otacon94 - Python

sunilgknair051 commented 4 years ago

Go ahead, please check the respective folders for a similar snippet. Then, if it is already implemented in another language, you can choose and comment on Java or C++ and I will assign it to you. Thanks.

itslinotlie commented 4 years ago

Just saw that Java was already completed, I will do it in C++ then :)

otacon94 commented 4 years ago

I can do in python if you want

itslinotlie commented 4 years ago

Saw that C++ was also implemented, closed my PR