阅读背景:

[LintCode] Number of Islands II_weixin_34239592的博客

来源:互联网 

Number of Islands II

Given a n,m which means the row and column of the 2D matrix and an array of pair A( size k). Originally, the 2D matrix is all 0 which means there is only sea in the matrix. The list pair has k operator and each operator has two integer A[i].x, A[i].y means that you can change the grid matrix[A[i].x][A[i].y] from sea to island. Return how many island are there in the matrix after each operator.Given a n,m which m




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: