sol. of leecode