Update longestSnake.cpp