Implementation of Needleman-Wunsch and Hirschberg's Algorithm