Solutions for leecode