1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
iogann1982 [59]
3 years ago
13

Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and

then deque elements. Which indices of the internal array elements hold the remaining elements? a) 0 to 2 b) 7 to 9 c) 2 to 4 d) 1 to 3
Computers and Technology
1 answer:
Anika [276]3 years ago
7 0

Full question:

Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and then deque 2 elements. Which indices of the internal array elements hold the remaining elements? a) 0 to 2 b) 7 to 9 c) 2 to 4 d) 1 to 3

Answer and Explanation:

If you instantiate a capacity of 10 for the queue, you have the queue a capacity of not more than 10 values.

To enqueue means to add an element to the array(if it's not full, n<10)

To dequeue means to delete an element from the array or queue(if n! =0)

From the question, for example:

We create a queue of capacity 10:

Queue q(10);

We add elements/enqueue 5 elements to the queue :

q.queueEnqueue(10);

q.queueEnqueue(5);

q.queueEnqueue(8);

q.queueEnqueue(9);

q.queueEnqueue(2);

If we print this out:

q. queueDisplay()

We would get:

10, 5, 8, 9, 2

We remove elements/dequeue 2 elements from the queue :

q. queuedequeue();

q. queuedequeue();

We print it out:

q. queueDisplay()

8 ,9, 2

We observe that deletion/dequeue starts from the front/first index.

We are left with indices 2, 3, 4 or 2 to 4

Note: the above methods/ functions and objects used are merely for example purposes. The queue uses a floating front design approach.

You might be interested in
Does anyone play call of duty cold war campaign. I have a question, please help me.
-Dominant- [34]

Answer:

so please

Explanation:

please upload the question so I can answer ,by the way I don't play call of duty

5 0
2 years ago
Read 2 more answers
Which slideshows design can not be use?
Readme [11.4K]

Answer:

Is there suppose to be a pic ?

Explanation:

7 0
2 years ago
When you compile your program, the compiler identifies the logic errors and suggests how to correct them?
Rainbow [258]
Nope. You're on your own to find them and fix them. This why testing is so important, otherwise they won't show up until the customer finds them and that's embarrasing.
6 0
3 years ago
PLEASE HELP ME!!!!!! ITS FOR 100 POINTS AND BRAINLIEST!!!!!!!! NO ONE EVER WANTS TO ANSWER MY QUESTION!!! I JUST NEED SOMEONE TO
KonstantinChe [14]

Answer:

be creative

Explanation:

being creative helps you and our time brainstorm some good ideas that will help you succeed and allow your team mates to have a voice too if you follow these you will be a good team leader

i dont know if  if this the answer that your looking for but i hope it help

7 0
2 years ago
Read 2 more answers
Write a Objective Summary <br><br> 7th Grade by Gary Soto
natka813 [3]

Answer:EL SIGLO 20

Explanation:POR EMILIANO ZPAATA

5 0
2 years ago
Other questions:
  • Your network employs basic authentication that centers on usernames and passwords. However, you have two ongoing problems. The f
    13·1 answer
  • Create and execute a SELECT statement that would provide data for a vendor directory. Display should include vendor number, vend
    13·1 answer
  • Which career path includes the work duties of hiring and managing farm laborers?
    6·2 answers
  • Meg[] elements = {new Lois(), new Stewie(), new Meg(), new Brian()}; for (int i =0; i
    15·1 answer
  • A state university locks in costs for a student once a student starts attending the university. The total cost is $24,500. A stu
    10·2 answers
  • A semiconductor kit is used on a
    13·1 answer
  • Which cpu type would most likely be found in a smartphone?.
    10·1 answer
  • Write a Python statement that displays the value referenced by the number variable formatted as1,234,567.5
    9·1 answer
  • What are three ways digital identity is created and kept up? (open answer)
    5·1 answer
  • What type of storage drive contains multiple spinning platters?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!