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
Aleksandr-060686 [28]
3 years ago
10

Suppose that a queue is implemented using a circular array of size 12. What is the value of last after the following operations?

Computers and Technology
1 answer:
otez555 [7]3 years ago
8 0

Answer:

10

Explanation:

An enqueue operation is a function that adds an element(value) to a queue array. A dequeue operations removes an element from a queue array. Queue arrays follow a first-in-first-out approach, so elements that are first stored in the queue are removed/accessed first(enqueue operations add elements at the rear of the queue array).

The following operations leave 10 elements in the queue of array size 12 after its done:

10 enqueue operations= adds 10 elements

5 dequeue operations= removes 5 elements( 5 elements left in queue)

6 enqueue operations= adds 6 elements(11 elements in queue)

10 dequeue operations= removes 10 elements(1 element left in queue)

8 enqueue operations= adds 8 elements(9 elements in queue)

2 dequeue operations= removes 2 elements(7 elements left in queue)

3 enqueue operations= adds 3 elements(10 elements in queue)

Therefore there are 10 elements in the queue after enqueue and dequeue operations.

You might be interested in
Kevin wants an application that will help him create a website as well as publish it. What application can he use?
AURORKA [14]

Answer:

D

Explanation:

Adobe Dreamweaver can hep him make a website and publish it.

3 0
3 years ago
True or false
Semmy [17]
It’s false I hope this helped you
3 0
2 years ago
Peter works on a huge database of numerical figures in a worksheet ranging from cell A1 to cell I50. He has to print the workshe
Amiraneli [1.4K]
Landscape and portrait page orientation.
4 0
2 years ago
Read 2 more answers
Write a program in C++ to implement bubblesort using the swap function ?
marishachu [46]

C++ program for implementation of Bubble sort  

#include <bits/stdc++.h>  

using namespace std;  

 void swap(int *x, int *y)  /*Defining Swap function of void return type*/

{  

  int temp = *x;  //Swaping the values  

   *x = *y;  

   *y = temp;  

}  

void bubbleSort(int array[], int n) /*Defining function to implement bubbleSort  */

{  

  int i, j;  

  for (i = 0; i < n-1; i++)      

      for (j = 0; j < n-i-1; j++)  /*The last i components are already in location  */

      if (array[j] > array[j+1])  

          swap(&array[j], &array[j+1]);  //Calling swap function

}  

int main()  //driver function

{  

   int array[] = {3, 16, 7, 2, 56, 67, 8}; //Input array  

   int n = sizeof(array)/sizeof(array[0]);  //Finding size of array

   bubbleSort(array, n); //Function calling  

   cout<<"Sorted array: \n";  

   for (int i = 0; i < n; i++)  //printing the sorted array

       cout << array[i] << " ";  

   cout << endl;  

 return 0;  

}  

<u>Output</u>

Sorted array:  

2 3 7 8 16 56 67

3 0
3 years ago
Which type of systems development is characterized by significantly speeding up the design phase and the generation of informati
nydimaria [60]

Answer:

Joint Application Development (JAD)

Explanation:

Joint Application Development is a method of application development that  lay emphasis on the up-front aspect of the application development cycle whereby steady communication between the designers and the intended users of the application under development by coming together in collaborative workshop styled discussions known as JAD sessions involving the mediators, facilitator, observers, end users, experts, and developers. As such with JAD process application development result in fewer errors high quality and is completed in lesser time.

3 0
2 years ago
Other questions:
  • Internet control message protocol (icmp) is a method of ip address assignment that uses an alternate, public ip address to hide
    7·1 answer
  • Why should ERP architecture include a discussion on organizational structure, business processes, and people, instead of just in
    5·1 answer
  • 15 points. Please give an actual answer and not some random thing. this is not just free points. Correct answer will receive bra
    12·2 answers
  • 1.What is a keyboard layout.
    5·1 answer
  • Allows a user to control the<br>volume of the computer​
    8·1 answer
  • Qr code is more developed than barcode​
    11·1 answer
  • Charles was supposed to present his PowerPoint slides to his classmates in a classroom, but now he has to present in the auditor
    12·2 answers
  • An IT security threat is anything that might cause serious harm to a computer system.
    9·1 answer
  • Q2: Mark True or False in the corresponding Answer sheet (0.5 point each)
    8·1 answer
  • Given a list of syntax errors from a compiler, a programmer should focus attention on which error(s), before recompiling?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!