摘要: class node{ int x; int y; } public class Test { public static void main(String[] args) { MyQueue q=new MyQueue(); q.push("xxx"); q.push("xxx"); q... 阅读全文
posted @ 2019-10-03 22:48 pycodego 阅读(599) 评论(0) 推荐(0) 编辑
摘要: import java.util.Deque; import java.util.LinkedList; class node{ int x; int y; } class Solution{ private int dir[][]=new int[][] {{0,-1},{-1,0},{0,1},{1,0}}; private node parentx[][]; private int Coun 阅读全文
posted @ 2019-10-03 22:20 pycodego 阅读(337) 评论(0) 推荐(0) 编辑
摘要: map=new Vector<Vector<Integer>>(m); for(int i=0;i<m;++i) { Vector<Integer>temp=new Vector<Integer>(); for(int j=0;j<m;++j) { temp.add(-1); } map.add(t 阅读全文
posted @ 2019-10-03 21:56 pycodego 阅读(5054) 评论(0) 推荐(0) 编辑
摘要: 最近在学习最小生成树时,用到了优先队列这个结构,琢磨这自己也来写下,搞了半天终于写出来了,于是就记录下 阅读全文
posted @ 2019-10-03 20:23 pycodego 阅读(743) 评论(0) 推荐(0) 编辑