摘要: JAVA 暴力(BFS): public final int[] findBall(int[][] grid) { int len = grid[0].length; int[] balls = new int[len]; for (int i = 0; i < balls.length; i++) 阅读全文
posted @ 2021-05-30 23:06 牛有肉 阅读(73) 评论(0) 推荐(0) 编辑
摘要: 贪心 JAVA: public final int minFlips(String target) { int len = target.length(), num = 0; for (int i = 0; i < len; i++) { char curr = num % 2 == 0 ? '0' 阅读全文
posted @ 2021-05-30 09:12 牛有肉 阅读(60) 评论(0) 推荐(0) 编辑