String Editing Problem

In the string correction problem, we are given 2 strings X and Y with a parameter k and asked whether X can be turned into Y by at most k edit operations. Assume that allowed operations are (i) deleting a simple character and (ii) swapping 2 consecutive characters. Give an algorithm that solve the problem in O(2^k n ) where n is the length of X.