rewrite word ladder and finished 1st but failed on large data of 2nd