Implementation Needleman-Wunsch / Smith–Waterman algorithm (Swift)