Update two sum

3 versions