Added solution for problem 18 in C++
Added largest sum function to simplify