Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
4 votes
3 answers
812 views

FIFO array/queue

I'm new to programming and was tasked with programming a generic circular FIFO queue, without using anything but an underlying array and self-programmed methods. I still don't know how to approach ...
deutschistschwer's user avatar
1 vote
3 answers
3k views

Deque implemented using a circular array

I found a tutorial on implementing a deque using a circular array. I changed the implementation but I am not sure if it is correct or not. So I have one question: I wrote code that uses an ...
beehuang's user avatar
  • 111
2 votes
2 answers
1k views

FIFO Queue Implementation

My Implementation of a FIFO queue. I am mainly curious about my initialization of empty generic arrays. ...
jacksonecac's user avatar
4 votes
2 answers
6k views

Queue resizing array implementation

After learning about linked list implementations of a queue I was asked to try a resizing array implementation. I'm looking for constructive criticism. ...
Rocky's user avatar
  • 43
4 votes
2 answers
224 views

DoublingQueue in Java

Inspired by this CR question, I decided to create my own queue! If you guys see anything taboo or have any improvements, please let me know. Ultimately I want it to be feature rich and bug free, with ...
T145's user avatar
  • 3,149
12 votes
5 answers
692 views

FiniteArrayQueue type with interface and unit tests

Doing some exercises on basic data structures, I learned about queues, and decided to roll my own to better understand how a basic queue can function. As the name indicates, this Queue is made from a ...
Phrancis's user avatar
  • 20.5k
2 votes
2 answers
6k views

Array-based deque in Java

Are the conditions which I have included for insertion and deletion from front and rear sufficient and necessary? Have I missed some condition check? Or have I included some redundant condition? <...
user avatar
5 votes
2 answers
2k views

Queue implementation using arrays

Please review the code: ...
wandermonk's user avatar
8 votes
4 answers
50k views

Array Implementation of Queue

I've implemented the queue data structures using array in java. Anything I need to change in my code? Queue.java ...
Arun Prakash's user avatar
  • 1,493
3 votes
4 answers
995 views

A more efficient enqueue algorithm in Java

So I have this simple code in Java. It enqueue (adds) and element to the end of the queue (implemented by an ArrayList) without ...
MandM's user avatar
  • 31