132/132 solutions of leetcode.com, c++ version