leetCode problems solution