摘要: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 { .
        
阅读全文
 
    
        
        
摘要: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 * ...
        
阅读全文
 
    
        
        
摘要: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}, ...
        
阅读全文
 
    
        
        
摘要: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[...
        
阅读全文
 
    
        
        
摘要: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...
        
阅读全文
 
    
        
        
摘要: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...
        
阅读全文
 
    
        
        
摘要: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...
        
阅读全文
 
    
        
        
摘要: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...
        
阅读全文
 
    
        
        
摘要: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...
        
阅读全文
 
    
        
        
摘要: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....
        
阅读全文
 
    
        
        
摘要: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(); /** * ...
        
阅读全文