soulmachine / leetcode

LeetCode题解,151道题完整版。
BSD 3-Clause "New" or "Revised" License
11.29k stars 3.44k forks source link

surrounded regions 貌似有bug #15

Closed riveridea closed 10 years ago

riveridea commented 10 years ago

for (int i = 0; i < n; i++) for (int j = 0; j < m; j++)

应该改成 for (int i = 0; i < m; i++) for (int j = 0; j < n; j++)

至少我目前测试的结果是这样。

soulmachine commented 10 years ago

我看了下,我的i对应于m,j对应于n,你是不是看错了?且我的代码可以AC

riveridea commented 10 years ago

ok, 我之前下载的你的pdf是反过来的,现在看到改过来了,现在的没问题 了。