PathSum perfect solution (Author: Xin Zhou)