cpp implementation of 4 Sum