Added an implementation of the Viterbi algorithm