花间一壶酒

导航

02 2012 档案

栈的应用-数制转换
摘要:package com.wrh.lab.dataStructure.stackAndQueue.practise;import com.wrh.lab.dataStructure.stackAndQueue.Stack;import com.wrh.lab.dataStructure.stackAndQueueImpl.LinkedStackImpl;/** * * @author wrh * number system conversion * convert decimal system to other system */public class NumberConversion { . 阅读全文

posted @ 2012-02-21 18:36 wrh526 阅读(206) 评论(0) 推荐(0)

二叉树-链式存储-Java实现(未完待续)
摘要:package com.wrh.lab.dataStructure.tree;/** * the node of the binary tree * @author wrh * */public class BinaryNode<E> { private E element; //the element private BinaryNode<E> left; //the left point private BinaryNode<E> right; //the right point /** * build an node * ... 阅读全文

posted @ 2012-02-16 17:29 wrh526 阅读(230) 评论(0) 推荐(0)

稀疏矩阵转换为三元组
摘要:package com.wrh.lab.dataStructure.arrayAndGenericTable;/** * * @author wrh *SparseMatrix convert to Three Tuple */public class SparseMatrixToThreeTuple { public static void main(String[] args) { int[][] data = { {0,0,0,0,0,0}, {0,3,0,0,0,0}, ... 阅读全文

posted @ 2012-02-16 17:25 wrh526 阅读(722) 评论(0) 推荐(0)

数组按行/列优先存储转换
摘要:package com。wrh.lab.dataStructure.arrayAndGenericTable;/** * test the array convert * @author wrh * */public class ArrayConvert { public static void main(String[] args) { int[][] data = {{1,2,3,4},{5,6,7,8},{9,10,11,12}}; int[] rowData = new int[12]; int[] colData = new int[... 阅读全文

posted @ 2012-02-16 17:23 wrh526 阅读(520) 评论(0) 推荐(0)

队列- 链式存储-Java实现
摘要:package com.wrh.lab.dataStructure.stackAndQueue;/** * the interface of queue * @author wrh * * @param <E> */public interface Queue<E> { /** * enqueue the element * @param element */ public void enqueue(E element); /** * * @return the dequeue element */ pu... 阅读全文

posted @ 2012-02-16 17:20 wrh526 阅读(256) 评论(0) 推荐(0)

循环队列-顺序存储-Java实现
摘要:package com.wrh.lab.dataStructure.stackAndQueue;/** * the interface of queue * @author wrh * * @param <E> */public interface Queue<E> { /** * enqueue the element * @param element */ public void enqueue(E element); /** * * @return the dequeue element */ pu... 阅读全文

posted @ 2012-02-16 17:17 wrh526 阅读(476) 评论(0) 推荐(0)

栈-链式存储-Java实现
摘要:package com.wrh.lab.dataStructure.stackAndQueue;/** * the interface of the SeqStack * @author wrh * * @param <E> */public interface Stack<E> { /** * push the element to the stack * @param element */ public void push(E element); /** * pop the element from the stack an... 阅读全文

posted @ 2012-02-16 17:14 wrh526 阅读(275) 评论(0) 推荐(0)

栈-顺序存储-Java实现
摘要:package com.wrh.lab.dataStructure.stackAndQueue;/** * the interface of the SeqStack * @author wrh * * @param <E> */public interface Stack<E> { /** * push the element to the stack * @param element */ public void push(E element); /** * pop the element from the stack an... 阅读全文

posted @ 2012-02-16 17:12 wrh526 阅读(199) 评论(0) 推荐(0)

循环链表-链式存储-Java实现
摘要:package com.wrh.lab.dataStructure.linearList;/** * * @author wrh * the interface of the linked list * */public interface LinkedList<E> { /** * insert the item at prior * @param item */ public void insertAtPrior(E item); /** * insert the item at the end of the list... 阅读全文

posted @ 2012-02-16 17:08 wrh526 阅读(201) 评论(0) 推荐(0)

单链表-链式存储-Java实现
摘要:package com.wrh.lab.dataStructure.linearList;public class SingleListNode<E> { private SingleListNode<E> next; private E data; public SingleListNode(E data) { this.data = data; next = null; } public SingleListNode(E data, SingleListNode<E> nextNode) { this.... 阅读全文

posted @ 2012-02-16 17:04 wrh526 阅读(218) 评论(0) 推荐(0)

链表-顺序存储-Java实现
摘要:package com.wrh.lab.dataStructure.linearList;/** * * @author wrh * the interface of linear list. * */public interface LinearList<E> { /** * identify whether the list is empty or not * @return true for empty and false for not empty */ public boolean isEmpty(); /** * ... 阅读全文

posted @ 2012-02-16 17:00 wrh526 阅读(338) 评论(0) 推荐(0)