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
Arte-miy333 [17]
3 years ago
5

Consider the following sequence of items 10, 36, 25, 54, 37, 12, 75, 68, 42, 86, 72, 90. Insert these items in the order above,

into an initially empty implicit binary max-heap. Show the heap throughout the process but write down the heap as an answer after every 3 INSERT() operations. (Just hand-simulate the behavior of the implicit binary max-heap, and draw the resulting heap, both throughout the entire process and the ones after every 3 INSERT() operations as answers (note that the former is to show all your work so that partial credits can be given in case you make mistakes, while the latter (answers) are the ones to be graded). Draw them in the form of a tree rather than an array.)

Computers and Technology
1 answer:
AnnZ [28]3 years ago
5 0

Answer:

See attachment below

Explanation:

You might be interested in
While traditionally employers used computers to track ordering and inventory, computers are used now to
AlexFokin [52]

Answer:

The correct answer should be A. automate merchandise ordering and inventorying.

5 0
4 years ago
WILL GIVE MORE POINTS, PLEASE HELP!!!
Karo-lina-s [1.5K]
Right 4 down 5 right 8 !!!!!!!!!
5 0
3 years ago
In multi-grade oil what is W means?
Simora [160]

Answer:

winter viscosity grades

Explanation:

6 0
3 years ago
Write an application that inputs a five digit integer (The number must be entered only as ONE input) and separates the number in
netineya [11]

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 int n, num;

 Scanner input = new Scanner(System.in);

 System.out.print("Number of inputs: ");

 n = input.nextInt();

 LinkedList<Integer> myList = new LinkedList<Integer>();

 for(int i = 0; i<n;i++){

     System.out.print("Input Integer: ");

     num = input.nextInt();

     while (num > 0) {

     myList.push( num % 10 );

     num/=10;

     }

     while (!myList.isEmpty()) {

         System.out.print(myList.pop()+" ");

     }

     System.out.println();

     myList.clear();

 }

}

}

Explanation:

This declares the number of inputs (n) and each input (num) as integer

 int n, num;

 Scanner input = new Scanner(System.in);

Prompt for number of inputs

 System.out.print("Number of inputs: ");   n = input.nextInt();

The program uses linkedlist to store individual digits. This declares the linkedlist

 LinkedList<Integer> myList = new LinkedList<Integer>();

This iterates through n

 for(int i = 0; i<n;i++){

Prompt for input

     System.out.print("Input Integer: ");

This gets input for each iteration

     num = input.nextInt();

This while loop is repeated until the digits are completely split

     while (num > 0) {

This adds each digit to the linked list

     myList.push( num % 10 );

This gets the other digits

     num/=10;

     }

The inner while loop ends here

This iterates through the linked list

     while (!myList.isEmpty()) {

This pops out every element of thelist

         System.out.print(myList.pop()+" ");

     }

Print a new line

     System.out.println();

This clears the stack

     myList.clear();

 }

8 0
3 years ago
Using the college registration example from section 6.7.3 as a starting point, do the following:
Arada [10]

Answer:

Explanation:

NCLUDE Irvine32.inc

TRUE = 1

FALSE = 0

.data

gradeAverage WORD ?

credits WORD ?

oKToRegister BYTE ?

str1 BYTE "Error: Credits must be between 1 and 30" , 0dh,0ah,0

main PROC

call CheckRegs

exit

main ENDP

CheckRegs PROC

push edx

mov OkToRegister,FALSE

; Check credits for valid range 1-30

cmp credits,1 ; credits < 1?

jb E1

cmp credits,30 ; credits > 30?

ja E1

jmp L1 ; credits are ok

; Display error message: credits out of range

E1:

mov edx,OFFSET str1

call WriteString

jmp L4

L1:

cmp gradeAverage,350 ; if gradeAverage > 350

jna L2

mov OkToRegister,TRUE ; OkToRegister = TRUE

jmp L4

L2:

cmp gradeAverage,250 ; elseif gradeAverage > 250

jna L3

cmp credits,16 ; && credits <= 16

jnbe L3

mov OkToRegister,TRUE ; OKToRegister = TRUE

jmp L4

L3:

cmp credits,12 ; elseif credits <= 12

ja L4

mov OkToRegister,TRUE ; OKToRegister = TRUE

L4:

pop edx ; endif

ret

CheckRegs ENDP

END main

8 0
3 years ago
Other questions:
  • How will you be assigned with a mailbox with any OSP
    6·1 answer
  • Why were the spices in Asia so expensive when sold in Europe?
    11·2 answers
  • Two electronics technicians are discussing electrical quantities. Technician A says that resistance is an opposition to electric
    6·1 answer
  • I need help please <br> just plug in the words with their definitions.......
    10·2 answers
  • in access, entering the search criteria "B?" would yield which of the following results? a. bentonville b. be c. brimingham d. b
    14·1 answer
  • Tim is trying to explain to his aunt how her computer works, but she does not understand what a CPU does. Which description will
    11·1 answer
  • Name two different ways you can bring up the my computer folder
    9·2 answers
  • Which of the following characteristics differentiates PCM from BWF audio
    15·2 answers
  • Apart from using secure networks, how else can Dhruv keep his deliverables safe in the office and on the go? Select all that app
    8·1 answer
  • Which blu-ray standard defines rewritable disks?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!