add output arraylist function
Edit distance problem using Dynamic Programming