Class IIntQueue


  • public class IIntQueue
    extends Object
    char queue class base on double link Not thread safe
    Author:
    chenxin
    • Constructor Detail

      • IIntQueue

        public IIntQueue()
    • Method Detail

      • enQueue

        public boolean enQueue​(int data)
        append a int from the tail
        Parameters:
        data -
        Returns:
        boolean
      • deQueue

        public int deQueue()
        remove the node from the head and you should make sure the size is larger than 0 by calling size() before you invoke the method or you will just get -1
      • size

        public int size()
        get the size of the queue
        Returns:
        int