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
oksano4ka [1.4K]
3 years ago
9

Which statement is correct? (Note: Our selectionsort picks largest items first.) A. The algorithm might be either selectionsort

or insertionsort. B. The algorithm might be selectionsort, but could not be insertionsort. C. The algorithm might be insertionsort, but could not be selectionsort. D. The algorithm is neither selectionsort nor insertionsort.
Computers and Technology
1 answer:
babunello [35]3 years ago
3 0

Answer:

The statement which is correct:

c. The algorithm might be insertion sort, but could not be selection sort.

Explanation:

Selection sort:

In data structure, such a sorting technique in which the smallest element from the unsorted array is swapped with the left-most element. So, the first digit is always the smallest.

Insertion Sort:

In data structure, such a sorting technique in which each element is compared with all other elements of the array.

  • As our selection sort picks the largest items first so it can't be selection but can be insertion sort as insertion sort the largest item can come on the first position.

You might be interested in
A collection of related files that serves as a foundation for retrieving information is a: byte
dem82 [27]
<span>c. database  is the answer.</span>
3 0
3 years ago
What does getfenv() do?
mariarad [96]

Answer: getfenv() is a type of function. Particually a envirotment function. for a lua coding.

Explanation: What this does it goes thourgh  line of code in a particular order.

This means. getfenv is used to get the current environment of a function. It returns a table of all the things that function has access to. You can also set the environment of a function to another environment.

Forgot to include examples of where this could be used. Although not very common uses, there are some. In the past Script Builders used getfenv to get the environment of a script, and setfenv to set the environment of a created script’s environment to a fake environment, so they couldn’t affect the real one. They could also inject custom global functions.

Not entirely sure if this uses getfenv or setfenv, but the use in Crazyman32’s AeroGameFramework is making the environment of each module have access to other modules without having to require them, and having access to remotes without having to directly reference them.

5 0
2 years ago
Read 2 more answers
A mobile device user is having problems launching apps and texting. The user touches an app to launch it, but the app icon next
dalvyx [7]

Answer:

The screen protector may be interfering with the touch response

Explanation:

Screen protectors or commonly called screen guards are used to protect phone screens. In case they fall to the ground, these protectors act as shields to keep the phone screen from getting damaged. However screen protectors if not positioned or fixed properly may also cause hindrance to effective touch response as they become barriers to the touch screen.

8 0
2 years ago
Consider the following method: public double doubleVal(double x) { return x *2; } The following code segment calls the method do
VashaNatasha [74]

Answer:

13.0

Explanation:

The method doubleVal() is created to accept a single parameter of type double.

It multiplies what ever the value of the parameter is and returns the resulting value.

In this question The method is called within this output statement System.out.println(doubleVal(val)); (Note that val had already been declared and assigned the value of 6.5)

The value 6.5 is doubled and outputed to the screen

8 0
3 years ago
Write a method called removeInRange that accepts four parameters: an ArrayList of integers, an element value, a starting index,
Murrr4er [49]

Answer:

public static void removeInRange(List<Integer> list, int value, int start, int end) {

       for (int i = end - 1; i >= start; i--) {

           if (list.get(i) == value) {

               list.remove(i);

           }

       }

       System.out.println(list);

   }

Explanation:

- Create a method named <em>removeInRange</em> that takes four parameters, a list, an integer number, a starting index and an ending index

- Inside the method, initialize a <u>for loop</u> that iterates between starting index and ending index

- If any number between these ranges is equal to the given <em>value</em>, then remove that value from the list, using <u>remove</u> method

- When the loop is done, print the new list

7 0
3 years ago
Other questions:
  • Why do objects in the back seat move when the car turns
    11·1 answer
  • Which part is the author’s address?
    5·1 answer
  • Data means a group of numbers. <br> a. True<br> b. False
    7·1 answer
  • True or false: within a database, fields can be added, deleted and edited but never moved.
    11·1 answer
  • The following types of websites are
    10·1 answer
  • What is the model for 2017 Ford Mustang v6
    15·1 answer
  • Anyone know this awnser computer science
    14·2 answers
  • Any one know??please let me know
    15·2 answers
  • Write if true or false
    12·1 answer
  • When right-clicking an object, a ____ menu appears, which contains frequently used commands related to the object.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!