Intuit Interview Question

Edit distance problem