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
Mark for review (Will be highlighted on the review page) 11. A feature in Excel that allows you to graphically display in a sing
Tresset [83]
A feature in Excel that allows you to graphically display in a single cell the trend across a range of cells is called a sparkline.
8 0
3 years ago
Here is the list of problems to choose from:
olya-2409 [2.1K]

Answer:

There's a parking lot that is 600m² big. The lot must be able to hold at least 3 buses and 10 cars.

Each car takes up 6m² and each bus takes up 30m².

However, there can only be 60 vehicles in the lot at any given time.

The cost to park in the lot is $2.50 per day for cars and $7.50 per day for buses. The lot must make at least $75 each day to break even.

What is a possible car to bus ratio that would allow the lot to make profit?

3 0
2 years ago
Donna is a graphic designer working on a poster for a music concert. What is her objective?
Marina86 [1]

Answer:her objetive is to impress the public with the poster.

Explanation:

The poster have to be about the music. It is very important for the singer or the festival.

The objetive is going on with the festival, with the music and with the concert’s style.

It’s a personal design. But it have to be original for every design.

3 0
2 years ago
Read 2 more answers
you just bought a new hard drive for your computer you plan to use this as a secondary hard drive to store all um a files once i
mihalych1998 [28]
Well, you need to partition your hard drive. Partitioning your hard drive designates usable space on your hdd.

And you need to format your hard drive. Formatting installs a file system on to your hard drive, it allows the operating system to read, write and overall understand the data stored on the disk. Without it, an OS cannot keep track of file locations, nor can it typically identify already used sectors (space) on a hdd. 
However, neither of these two concepts are tests.  
7 0
3 years ago
These things are commonly found on the front of desktop computer cases:
jok3333 [9.3K]

USB ports, headphone jack/microphone port, and of course, a power button.

3 0
3 years ago
Other questions:
  • Helen has no experience in security. She would like to earn a certification that demonstrates that she has the basic knowledge n
    15·1 answer
  • Universal containers wants to rollout new product bundles with several pricing options. Pricing options include product-price bu
    5·1 answer
  • An effective team would never have​
    9·1 answer
  • Which magazine can help public determine best technology to buy
    12·1 answer
  • What is the best information to include in the template name to differentiate it from other templates? Check all that apply.
    6·1 answer
  • Write a SELECT statement that selects all of the columns for the catalog view that returns information about foreign keys. How m
    6·1 answer
  • Why is failure important when you are designing a solution to a problem?
    6·2 answers
  • Why computer literacy is vital to access in business work
    7·1 answer
  • Yeah help me please......................
    9·1 answer
  • Raw materials have two basic types what are the 2?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!