Express the worst case run time of these pseudo-code functions as summations. You do not need to simplify the summations. a) function(A[1...n] a linked-list of n integers) for int i from 1 to n find and remove the minimum integer in A endfor endfunction

Answers

Answer 1
Answer:

Answer:

The answer is "O(n2)"

Explanation:

The worst case is the method that requires so many steps if possible with compiled code sized n. It means the case is also the feature, that achieves an average amount of steps in n component entry information.

  • In the given code, The total of n integers lists is O(n), which is used in finding complexity.
  • Therefore, O(n)+O(n-1)+ .... +O(1)=O(n2) will also be a general complexity throughout the search and deletion of n minimum elements from the list.

Related Questions

Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. The input file contains an unsorted list of number of seasons followed by the corresponding TV show. Your program should put the contents of the input file into a dictionary where the number of seasons are the keys, and a list of TV shows are the values (since multiple shows could have the same number of seasons).
IN PYTHON Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value. Ex: If the input is: Enter the number of integers in your list: 5 Enter the 5 integers: 50 60 140 200 75 Enter the threshold value: 100 the output is: The integers that are less than or equal to 100 are: 50 60 75The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75. Such functionality is common on sites like Amazon, where a user can filter results. Your code must define and call the following two functions: def get_user_values() def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold) Utilizing functions will help to make your main very clean and intuitive.
(Palindrome integer) Write the methods with the following headers // Return the reversal of an integer, i.e., reverse(456) returns 654 public static int reverse(int number) // Return true if number is a palindrome public static boolean isPalindrome(int number) Use the reverse method to implement isPalindrome. A number is a palindrome if its reversal is the same as itself. Write a test program that prompts the user to enter an integer and reports whether the integer is a palindrome.
An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular hours, plus any overtime pay.Overtime pay equals the total overtime hours multiplied by 1.5 times the hourly wage.Write a program that takes as inputs the hourly wage, total regular hours, and total overtime hours and displays an employee’s total weekly pay.Below is an example of the program inputs and output:Enter the wage: $15.50Enter the regular hours: 40Enter the overtime hours: 12The total weekly pay is $899.0
3. What is the error in the following pseudocode? // The searchName function accepts a string containing the name // to search for, an array of strings containing the names, and // an integer specifying the size of the array. The function // searches for the name in the array. If the name is found, the // string containing the name is returned; otherwise a message // indicating that the name was not found in the array is // returned. Function String searchName(String name, String names[], Integer size) Declare Boolean found Declare Integer index Declare String result // Step through the array searching for the // specified name. While found == False AND index <= size − 1 If contains(names[index], name) Then Set found = True Else Set index = index + 1 End If End While // Determine the result. If found == True Then Set result = names[index] Else Set result = "That name was not found in the array." End If Return result End Function

What does I/O mean in computing​

Answers

Explanation:

I/O (input/output)" describes any operation, program, or device that transfers data to or from a computer

Why are two-way communications necessary between the front desk and housekeeping?

Answers

With a PDA on two-way correspondence, a servant's work routine can be preloaded into their terminal before the start of their work move. As the work is finished, the data is transmitted to the front office frameworks. They can utilize the two-route correspondence to convey changes and prompt needs or crises with each other in a matter of moments.

In the glare of the sun, it is hard to see and be seen. Name six precautions

Answers

In the glare of the sun, it is hard to see and be seen. Some precautions would be :
1) 
Have a polarized sunglasses ready, they can help reduce glare.
2) Use your sun visor – it can help to block out the sun. 
3) Leave more following space between you and the next vehicle. 
4) Drive with your headlights on to increase your visibility to other drivers. 
5) Keep your windshield clean, inside and out, avoid storing papers or
     other items on the dashboard. 
6) If having a difficult time seeing the road, use the  lane markings to help
     guide you.

In this project you will write a set of instructions (algorithm). The two grids below have colored boxes in different locations. You will create instructions to move the colored boxes in grid one to their final location in grid two. Use the
example to help you. The algorithm that you will write should be in everyday language
(no pseudocode or programming language). Write your instructions at the bottom of the
page.
Example: 1. Move
the orange box 2
spaces to the right.
2. Move the green
box one space
down. 3. Move the
green box two
spaces to the left.
Write your instructions. Review the rubric to check your final work.
Rules: All 6 colors (red, green, yellow, pink, blue, purple) must be move to their new location on the grid. Block spaces are
barriers. You cannot move through them or on them – you must move around them

Answers

Answer:

Explanation:

Pink: Down 5 then left 2.

Yellow: Left 3 and down 2.

Green: Right 7, down 4 and left 1.

Purple: Up 6 and left 9.

Red: Left 7, down 5 and left 1.

You can do the last one, blue :)

Answer:

Explanation:

u=up, d=down, r=right, l=left

yellow: l3d2

pink: d5l2

green: r7d4l1

purple: u6l9

red: l7d5l1

blue: r2u7l5

what are "open source" programming language? Give examples of open source languages. Discuss the pros and cons of open source language.

Answers

Answer:

  The open source is the programming language that basically falls inside the parameters of the protocol of open-source convention. This fundamentally implies the language are not proprietary, with the specific arrangements (contingent upon the open source permit), can be adjusted and based upon in a way that is available to general society.

The python and ruby are the main examples of the open source programming language.

The disadvantage of the open source is that it is not much compatible as compared to all other software. It is not user friendly and easy for using the software.

The advantage of the open source programming is that it is available at low cost and it has high availability.

Factory Design Pattern Assignment This assignment will give you practice in using the Factory/Abstract Factory Design Pattern. You are going to create a Terraforming program. What does terraform mean

Answers

Answer:

Terraform is an open-source infrastructure as code software tool that enables you to safely and predictably create, change, and improve infrastructure.