CJCoding With Joseph
15free / daySign inCreate account

Enqueue Into an Array Queue

ShiftQueue stores its values in a plain array and always keeps the front at index 0. Every method except enqueue is already written.

Requirements:
1. Complete enqueue(int value) so it returns false when the queue is already full.
2. Otherwise store the value at index size, increase size, and return true.

Do NOT write a main method.

Expected Output:

true
true
true
Queue: 10 20 30
3

= newline. The output ends with a newline — print one after the last line.

Hints4 available
Topics:
Data Structures & AlgorithmsQueues
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.