subject

Write a function which sorts the stack in order from the largest value to the smallest value. this should be a modified version of bubble sort. 2. write a function which prints the values in the stack in reverse order. 3. write a function which the counts the number of odd numbers and even numbers currently in the stack and prints the results. optional 4. write a function which prints how many numbers in the stack are divisible by 2,3, and 5. part 2 (queue) 1. write a function which sorts the queue in order from the smallest value to the largest value. this should be a modified version of bubble sort. 2. write a function which adds a value to the queue in the correct position (numbers are arranged from the smallest value to the largest value). 3. write a function which prints the median and mean of the queue. take some time to consider all the required conditions to calculate the median of a dataset. optional 4. write a function which prints the mode of the queue. (the number which appears the most frequently in the queue) part 3 (link list) 1. write a function which adds 4 to all the even values in the link list and multiples all the odd values by 5. 2. write a function which multiplies the values in odd position values by 10. odd positions in this case refers to the first value in the list, the third value, the fifth value etc. 3. write a function which determines if the values in the queue is divisible by 5 or 10 if true the value is divided by 5. optional 4. write a function which prints all the prime values in the queue part 4 1. trace each demo program by hand using the table from your midterm exam for stacks and queues.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:30
Write a computer program to calculate the three-phase fault current for a fault at f in figure 1.16, with the network normal, and with one line at a time removedproblems 1.1 write a computer program to calculate the three-phase fault current for a fault at f in figure 1.16, with the network normal, and with one line at a time removed 20 power system relaying from service. the positive-sequence impedance data are given in the accompanying table. use the commonly made assumption that all prefault resistance values are (1.0+j0.0) pu, and neglect all resistance values. calculate the contribution to the fault flowing through the cb b and the voltage at that bus. for each calculated case, consider the two possibilities: cb b2 closed or open. the latter is known as the stub-end fault í• figure 1.16 problem 1.1 system data for figure 1.16 from to positive sequence 0.0+j0.1 0.05j0.15 0.04 j0.2 0.01 jo.i 0.015 + j0.15 0.01 j0.19 0.01 +j0.19 0.03+j0.1 0.0+j0.08 6 6 6 from service. the positive-sequence impedance data are given in the accompanying table. use the commonly made assumption that all prefault resistance values are (1.0 + j 0.0) pu, and neglect all resistance values. calculate the contribution to the fault flowing through the cb b1, and the voltage at that bus. for each calculated case, consider the two possibilities: cb b2 closed or open. the latter is known as the “stub-end” fault.
Answers: 2
question
Computers and Technology, 22.06.2019 04:30
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
question
Computers and Technology, 22.06.2019 09:50
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
You know the right answer?
Write a function which sorts the stack in order from the largest value to the smallest value. this s...
Questions