随笔分类 -  Data_Structure(种菜)

摘要:有些知识点可能平时一直在使用,不过实际开发中我们可能只是知其然不知其所以然,所以经常的总结会对我们的提高和进步有很大的帮助,这里记录自己在工作之余的问题,持续更新,欢迎高手斧正. 数组、List和ArrayList的区别 数组在内存中是连续存储的,所以它的索引速度是非常的快,而且赋值与修改元素也很简 阅读全文
posted @ 2017-05-09 11:22 BlueMonds 阅读(262) 评论(0) 推荐(0)
摘要:1.图的初始化: 1 public interface IGraph{ 2 void createGraph(); 3 int getVexNum(); 4 int getArcNum(); 5 Object getVex(int v); 6 int locateVex(Object vex); 7 阅读全文
posted @ 2017-04-13 21:54 BlueMonds 阅读(98) 评论(0) 推荐(0)
摘要:4. 层次遍历 BUG FREE 1 public void levelTraverse(){ 2 BiTreeNode T = root; 3 if(T != null){ 4 LinkQueue Q = new LinkQueue(); 5 Q.offer(T); 6 while(! Q.isE 阅读全文
posted @ 2017-04-09 10:54 BlueMonds 阅读(143) 评论(0) 推荐(0)
摘要:3. 结点类的描述: 1 //结点类的描述 2 public class Node{ 3 4 public Object data; 5 public Node next; 6 7 public Node(){ 8 this(null, null); 9 } 10 public Node(Objec 阅读全文
posted @ 2017-03-31 10:46 BlueMonds 阅读(147) 评论(0) 推荐(0)