Given two sequences \(Q\)  and \(C\)  of possibly different lengths, DTW stretches
or condenses two sequences to the same length. DTW allows nonlinear local
warping to take into account possible distortions. It finds an optimal alignment between \(Q\)  and \(C\)  such that the
accumulative Euclidean distance is minimized [1]}. In
doing so, it returns a distance value that measures the similarity between
the two sequences.
