package
Version:
v0.0.2-alpha
Opens a new window with list of versions in this module.
Published: Sep 8, 2021
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func BackQueue() interface{}
BackQueue return the Back value
func DeQueue() interface{}
DeQueue it will be removed the first value that added into the list
func EnQueue(n interface{})
EnQueue it will be added new value into our list
func FrontQueue() interface{}
FrontQueue return the Front value
IsEmptyQueue check our list is empty or not
LenQueue will return the length of the queue list
LQueue will be store the value into the list
Back it will return the back value
Dequeue will be removed the first value that input (First In First Out - FIFO)
Empty is check our list is empty or not
func (lq *LQueue) Enqueue(value interface{})
Enqueue will be added new value
Front it will return the front value
Len it will return the length of list
type Node struct {
Data interface{}
Next *Node
}
Node will be store the value and the next node as well
Queue structure is tell us what our head is and what tail should be with length of the list
Source Files
¶
Click to show internal directories.
Click to hide internal directories.