C++ solutions for www.leetcode.com questions