摘要: class TreeNode { int val; TreeNode left; TreeNode right; } class Solution { private Queuecur=new ArrayDeque(); private Queuenext=new ArrayDeque(); //两个队列交互使用来达到一个层层递进的效果从而完成层序遍历... 阅读全文
posted @ 2019-10-24 13:47 pycodego 阅读(809) 评论(1) 推荐(0) 编辑
摘要: class Solution { private int[][] dir= {{0,-1},{-1,0},{0,1},{1,0}}; private boolean[][] used; public boolean isMove(char[][] board,int x,int y) { if(x>=0&&x=0&&y一旦发现有0则立即调用dfs将... 阅读全文
posted @ 2019-10-24 12:20 pycodego 阅读(120) 评论(0) 推荐(0) 编辑