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
Olegator [25]
2 years ago
9

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 dequeue 2 elements. Which indices of the internal array elements hold the remaining elements
Computers and Technology
1 answer:
ASHA 777 [7]2 years ago
3 0

The indices of the internal array elements that hold the remaining elements is c) 2 to 4

<h3>Calculations and Parameters:</h3>

For us to create a capacity of 10 for the queue, we would enqueue:

We would create a queue of capacity 10:

<h3>Queue q(10);</h3>

We add elements/enqueue 5 elements to the queue :

  • q.queueEnqueue(10);
  • q.queueEnqueue(5);
  • q.queueEnqueue(8);
  • q.queueEnqueue(9);
  • q.queueEnqueue(2);

Printing this would give:

q. queueDisplay()

10, 5, 8, 9, 2

Next, we would remove elements/dequeue 2 elements from the queue :

q. queuedequeue();

q. queuedequeue();

Printing it would be:

q. queueDisplay()

8 ,9, 2

Observing this, the deletion/dequeue starts from the front/first index.

The remaining indices of the internal array elements are: 2, 3, 4 or 2 to 4

Read more about arrays and enqueue here:

brainly.com/question/24188935

#SPJ1

You might be interested in
PLZ ANSWER ALL MY QUESTION. Which line of code will display the variable num rounded to the nearest tenth?
zavuch27 [327]

Answer:

A

Explanation:

5 0
3 years ago
When you save a Notepad file for the first time, you must also A. print a copy for your records. B. give it a name. C. check the
Kruka [31]
Answer: Give it a name
3 0
3 years ago
Ano ang maikling kwento??
marishachu [46]

Answer with Explanation:

Ang "maikling kuwento" ay isang uri ng<em> kathang-isip</em> na may pagkapareho sa nobela. Ito'y may buong tema ngunit mas maikli kaysa sa nobela at mas madali rin itong matapos basahin. Hango ito sa mga tunay na pangyayari sa buhay ng tao. Binubuo ito ng limang elemento: <em>tauhan, tagpuan, hidwaan, tema at plot. </em>Ito'y may balak na pukawin ang damdamin ng nagbabasa ayon sa kalagayan ng mga tauhan sa kuwento at ito'y nag bibigay ng mabuting aral.

Si <em>Edgar Allan Poe</em> ang tinaguriang<em> "Ama ng Maikling Kuwento." </em>

3 0
3 years ago
Anyone here good with PS4's?
Nookie1986 [14]
I can help you out ! What do you need to know bud ?
6 0
3 years ago
Read 2 more answers
How many bit strings of length 12 contain the substring 111000?
ELEN [110]

Answer:

448 strings

Explanation:

Each bit string can be filled by two ways either 0 or 1. If the bit strings of length contain the substring '111000' we therefore need a substring of length 6.

The selection of bits starts from the 1st bit to 7th bit enclosing the substring 111000 and ensuring that the length 6 are all filled. So, there will be  7 ways to contain this substring.

The total ways to contain this substring = 7*2^6 =448

Therefore 448 strings of length 12 contain the substring '111000'.

7 0
3 years ago
Other questions:
  • Why is it unlikely that you will find the ip address 192.168.250.10 on the internet?
    15·1 answer
  • The eastern front was longer than other fronts of the war true or false
    7·2 answers
  • What is <br> Warehouse schema.
    14·1 answer
  • A file named data.txt contains an unknown number of lines, each consisting of a single integer. Write some code that creates two
    14·2 answers
  • If a piece of software designed to run on Windows XP can run on the latest version of Windows, we say the latest version of Wind
    14·1 answer
  • Which type of financial institution typically has membership requirements?
    9·2 answers
  • Heather writes an essay for language arts and receives a poor grade. To figure out why she gets a poor grade, Heather looks at t
    14·2 answers
  • In this exercise, you'll raise a manual exception when a condition is not met in a particular function. In particular, we'll be
    10·1 answer
  • Why isn't image display working on wacom tablet.
    8·1 answer
  • In python please:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!