I was browsing through the Java docs to look for the Java equivalent for C++'s STL Queue, but all I found was an interface called Queue and a bunch of implementations I can't make heads or tails of.
Does Java have an implementation for Queue that's just a FIFO data structure without the added bells and whistles? I only need the enqueue, dequeue and front operations and the data structure should allow duplicates.
Queue will work. Use any implementation you like. LinkedList or ConcurrentLinkedQueue for example.
enqueue = offer(..)dequeue = poll()front = peek()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With