摘要: 题目链接:https://leetcode-cn.com/problems/surrounded-regions/ ##官方题解 从四个边界的O出发进行深度搜索,将可以走通的路标为A,之后将A换为O,之后将不是A换过来的O置为X证明走不通。 class Solution { int n, m; pu 阅读全文
posted @ 2020-08-17 16:09 浅滩浅 阅读(81) 评论(0) 推荐(0)
摘要: 题目链接:https://leetcode-cn.com/problems/count-binary-substrings/ ##暴力超时了的代码:90个样例只过了37个 class Solution { public int countBinarySubstrings(String s) { in 阅读全文
posted @ 2020-08-17 14:00 浅滩浅 阅读(133) 评论(0) 推荐(0)