Professional Documents
Culture Documents
DAA Lab 12
DAA Lab 12
Roll- 2005129
Section- CSE 14
Branch- CSE
Q1) Implement Dynamic Time Wrapping Problem.
Source Code-
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n, m;
cout << "Enter the size for the first dataset sequence: ";
cin >> n;
cout << "Enter the size for the second dataset sequence: ";
cin >> m;
vector<int> a(n), b(m);
cout << "Enter the data points of the first sequence: ";
for (int i = 0; i < n; i++)
cin >> a[i];
cout << "Enter the data points of the second sequence: ";
for (int i = 0; i < m; i++)
cin >> b[i];
cout << "The Similarity between two array sequences - " << dp[n][m] << endl;
return 0;
}
Output: