solutions in cpp to some problems on leetcode