Update PathSum.cpp

Another implementation a few months later...