@@ -0,0 +1,1148 @@
+package leetcode.game_of_life;%0A%0Apublic class Solution %7B%0A    public void gameOfLife(int%5B%5D%5B%5D board) %7B%0A        if(board == null %7C%7C board.length == 0 %7C%7C board%5B0%5D.length == 0) return;%0A        int w = board%5B0%5D.length, h = board.length;%0A        for(int i = 0; i %3C h; i++)%7B%0A            for(int j = 0; j %3C w; j++)%7B%0A                int count = 0;%0A                for(int k = -1; k %3C= 1; k++)%7B%0A                    for(int l = -1; l %3C= 1; l++)%7B%0A                        if(k == 0 && l == 0)%7B%0A                            continue;%0A                        %7D%0A                        if(i + k %3C 0 %7C%7C i + k %3E= h) continue;%0A                        if(j + l %3C 0 %7C%7C j + l %3E= w) continue;%0A                        if((board%5Bi + k%5D%5Bj + l%5D & 1) != 0) count++;%0A                    %7D%0A                %7D%0A                if((board%5Bi%5D%5Bj%5D & 1) == 1)%7B%0A                    if(count == 2 %7C%7C count == 3) board%5Bi%5D%5Bj%5D %7C= 2; %0A                %7Delse%7B%0A                    if(count == 3) board%5Bi%5D%5Bj%5D %7C= 2;%0A                %7D%0A            %7D%0A        %7D%0A        for(int i = 0; i %3C h; i++)%7B%0A            for(int j = 0; j %3C w; j++)%7B%0A                board%5Bi%5D%5Bj%5D %3E%3E= 1;%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Add solution for Game of Life