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
Darina [25.2K]
3 years ago
8

Implement a metho d to nd the k-th largest element in an array of size N using a minimum priority queue (MinPQ). Assume that the

MinPQ class has a constructor that takes a single integer representing its maximum size, a insert(), a min(), a delMin(), an isEmpty(), and size() metho ds. The MinPQ do es not resize (to preserve O(logn p erformance). You may not imp ort any packages. Creating additional help er metho ds is ne but you should provide a one line comment that indicates their purp ose.
Computers and Technology
1 answer:
diamong [38]3 years ago
3 0

Sorry don't understand spanish,I am sure you can get it wrong,for crying out loud you people get checks for coming to United States

You might be interested in
You are driving on expressway with three lanes in your direction at a speed lower then
Kaylis [27]

<em>ANSWER:</em>

<em></em>

<h2>Pass on the left<em> </em></h2>

6 0
3 years ago
Read 2 more answers
Which kind of a person will you be if you prove to be accountable for your actions?
Black_prince [1.1K]

Answer: You would be a person of integrity.

Explanation: Look up Integrity for details.

3 0
3 years ago
The correct order of operations is _____. brackets, exponents, division, multiplication, addition, and subtraction subtraction,
bija089 [108]

brackets, exponents, division, multiplication, addition, and subtraction

6 0
3 years ago
Read 2 more answers
In c please
Paraphin [41]

Answer:

#include <stdio.h>

#include <ctype.h>

void printHistogram(int counters[]) {

   int largest = 0;

   int row,i;

   for (i = 0; i < 26; i++) {

       if (counters[i] > largest) {

           largest = counters[i];

       }

   }

   for (row = largest; row > 0; row--) {

       for (i = 0; i < 26; i++) {

           if (counters[i] >= row) {

               putchar(254);

           }

           else {

               putchar(32);

           }

           putchar(32);

       }

       putchar('\n');

   }

   for (i = 0; i < 26; i++) {

       putchar('a' + i);

       putchar(32);

   }

}

int main() {

   int counters[26] = { 0 };

   int i;

   char c;

   FILE* f;

   fopen_s(&f, "story.txt", "r");

   while (!feof(f)) {

       c = tolower(fgetc(f));

       if (c >= 'a' && c <= 'z') {

           counters[c-'a']++;

       }

   }

   for (i = 0; i < 26; i++) {

       printf("%c was used %d times.\n", 'a'+i, counters[i]);

   }

   printf("\nHere is a histogram:\n");

   printHistogram(counters);

}

5 0
2 years ago
Given input characters for an arrowhead and arrow body, print a right-facing arrow. Ex: If the input is: *
MrRa [10]

Answer:

Following are the code to this question:

b= input()#defining b variable for input character value

h= input()#defining h variable for input character value

b_width=6#defining b_width variable that holds an integer value 6

r1 = ' ' * b_width+h#defining r1 variable that calculates hash lines

r2 = b*b_width+h*2#defining r3 variable that calculates 6 asterisk and 2 hash line  

r3 = b*b_width+h*3#defining r3 variable that calculates 6 asterisk and 3 hash line

print(r1)#print r1 variable value

print(r2)#print r2 variable value

print(r3)#print r3 variable value

print(r2)#print r2 variable value

print(r1)#print r1 variable value

Output:

please find the attachment.

Explanation:

In the given python code, three variable "b,h, and b_width" is declared, in which "b_width" holds an integer variable "6" and variable "b and h" is used to an input character value.  In the next line, "r1, r2, and r3" is declared, that holds arrowhead values which can be defined as follows:

  • In the "r1" variable, it stores space with b_width variable and one h variable value.
  • In the "r2" variable it stores b_width and 2*h variable value.
  • In the "r3" variable it stores b_width and 3*h variable value.

At the last, it prints the "r1, r2, and r3" variable value and for arrowheads,  it follows the above program code.

6 0
3 years ago
Other questions:
  • You can add envelopes to existing documents. <br> a. True <br> b. False
    10·1 answer
  • The ____ category of apps makes the computer easier for blind people to use.
    9·1 answer
  • How do you convert a decimal to binary?
    9·2 answers
  • Write a program that reads numbers from a file (or allow user to input data) and creates an ordered binary tree. The program sho
    8·1 answer
  • Drive-by hacking is a computer attack where an attacker accesses a wireless computer network, intercepts data, uses network serv
    5·1 answer
  • write a method that will return a person's age entered by keyboard. You will need to include at least one instance variable in t
    11·1 answer
  • Я люблю есть гнезда петух
    11·1 answer
  • What is the difference between the byte and short data types in Java?
    7·1 answer
  • Why do you need to put your phone on airplane mode.
    14·1 answer
  • Create a timeline of the evolution of computers and their impact on society
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!