/ [root@localhost game-of-life]# git init 重新初始化现存的 Git 版本库于 /root/game-of-life/.git/ [root@localhost game-of-life]# git add . [root@localhost game-of-life]# git config --global user.email "zidingyi@gmail.com" [root@localhost game-of-life ]# git config --global user.name "zidingyi" [root@localhost game-of-life]# git commit -m "game" # 位于分支 [root@localhost game-of-life]# git push -u game master Counting objects: 7496, done.
for x, y, state in cells: board[x][y] = state Reference https://leetcode.com/problems/game-of-life
原题url:https://leetcode-cn.com/problems/game-of-life/ 解题 复制 + 遍历 因为细胞的出生和死亡是同时发生的,所以我们在更新时,只能根据上一个状态进行判定
生命游戏: https://leetcode-cn.com/problems/game-of-life/