mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-05 03:29:46 +08:00
Longest Common Subsequence
This commit is contained in:
@@ -18,10 +18,10 @@ int lcs(string a, string b){
|
||||
}
|
||||
return res[m][n];
|
||||
}
|
||||
int main(int argc, char const *argv[])
|
||||
int main()
|
||||
{
|
||||
string a,b;
|
||||
cin>>a>>b;
|
||||
cout<<lcs(a,b);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
Dynamic Programming/Longest Common Subsequence.exe
Normal file
BIN
Dynamic Programming/Longest Common Subsequence.exe
Normal file
Binary file not shown.
@@ -10,7 +10,6 @@ struct Item
|
||||
|
||||
float profitPerUnit(Item x)
|
||||
{
|
||||
// cout<<(float)x.profit/(float)x.weight<<"\n";
|
||||
return (float)x.profit/(float)x.weight;
|
||||
}
|
||||
|
||||
@@ -53,13 +52,6 @@ void quickSort(Item arr[], int low, int high)
|
||||
|
||||
|
||||
|
||||
// void show(Item arr[], int size)
|
||||
// {
|
||||
// for (int i=0; i < size; i++)
|
||||
// cout<<arr[i].weight<<"\t"<<arr[i].profit<<"\n";
|
||||
// }
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
cout<<"\nEnter the capacity of the knapsack : ";
|
||||
|
||||
BIN
Greedy Algorithms/Knapsack.exe
Normal file
BIN
Greedy Algorithms/Knapsack.exe
Normal file
Binary file not shown.
Reference in New Issue
Block a user