add dp method for check interleave string