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
Can some one help sorry I just so confused on this and I keep failing it I just need the help So choose the best answers
statuscvo [17]

Answer:

i7tyerged

Explanation:

7 0
3 years ago
Stores of data that are so large or complex that it is difficult to process them using traditional data base management applicat
OverLord2011 [107]

Answer: ....

Big Data

Explanation:

Big Data Technology can be defined as a Software-Utility that is designed to Extract,Analyse and  Process  the information from an extremely complex and large data sets which the Traditional Data Processing Software could never deal with. Big data is a field that treats ways to analyze, systematically extract information from, or otherwise deal with data sets that are too large or complex to be dealt with by traditional data-processing application software.

Predictive analytics assists enterprises in identifying future opportunities and likely risks by distinguishing specific patterns over the historical data. In general, prescriptive analytics is a predictive analytics which prescribes one or more courses of actions and shows the likely outcome/influence of each action.

6 0
3 years ago
A collection of related instructions organized for a common purpose is referred to as
marshall27 [118]
Computer or data. Lol
5 0
3 years ago
Read 2 more answers
_______ allows you to add formatting such as shapes and colors to text. a. worddraw b. wordart c. worddesign d. wordshapes
4vir4ik [10]
Word Design is the answer.
4 0
3 years ago
Read 2 more answers
How do you jumpstart a car in the middle of nowhere??? Explain using 2 paragraphs.
Julli [10]
Is there another car around? If not the best way would be to put the car in neutral, get the car moving, than pop the clutch (or slam into drive if it's not a manual) the key should be on to do this. This has the same effect as a starter just doesn't require a battery.<span />
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which translator program reads small portions of a program at a time, translating them into machine instructions which are then
    12·1 answer
  • Is Apple a consumer or luxury brand? Give examples.
    10·1 answer
  • An algorithm is defined as a well-ordered collection of unambiguous and effectively computable operations that when executed pro
    10·1 answer
  • For which type of long-distance call do you need to tell the operator the name of the person to whom you wish to speak?
    10·1 answer
  • _ models are non visual ways of communicating how someone thinks about something in the natural world
    12·1 answer
  • Match each sentence to the type of imperialism it describes.
    11·1 answer
  • Your friend's job pays $5.00 per hour, and he works 20 hours per week. His tax rate is 20 percent. Assuming he works 50 weeks of
    11·2 answers
  • Write a program that reads a string and outputs the number of times each lowercase vowel appears in it. Your program must contai
    14·1 answer
  • Xxx<br>uuuuuu<br>uuuu<br>jjnmn<br>jjh
    12·1 answer
  • Hey everyone please let my friends answer please?????? .
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!