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 look to different section of the same page is known as_____.
11Alexandr11 [23.1K]

Answer:

hatdoggggggggg

Explanation:

sunoggggggg

6 0
3 years ago
Select the correct answer.
SpyIntel [72]

Answer:

i think real time fluid dynamics

Explanation:

3 0
3 years ago
First write a method to calculate the greatest common divisor (GCD) of two positive integers using Euclid’s algorithm (also know
MAVERICK [17]

Answer:

import java.util.Scanner;

public class Gcd

{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 System.out.print("Enter two numbers to find their GCD: ");

 int number1 = input.nextInt();

 int number2 = input.nextInt();

 

 if(number1 > 0 && number2 > 0)

     System.out.println("GCD of " + number1 +" and " + number2 +" is: " + findGCD(number1, number2));

       else

           System.out.println("Invalid Input!");

}  

public static int findGCD(int number1, int number2) {

    if(number2 == 0){

        return number1;

    }

return findGCD(number2, number1 % number2);

}

}

Explanation:

To be able to find GCD, we need to factorize the numbers and multiply common factors.

- <u>Inside the function:</u>

- Recursively divide <em>number1</em> by <em>number2</em> until <em>number2</em> is equal to zero.

- Return <em>number1</em>  when the <em>number2</em> is equal to zero. That means we found all the divisors of <em>number1</em>

- <u>Inside the main:</u>

- Ask user to input numbers

- Check if both numbers are greater than zero

- If they satisfy the condition, call the method and print the result.

7 0
3 years ago
Which component of service-oriented DSS can be defined as data that describes the meaning and structure of business data, as wel
Licemer1 [7]

Answer:

The correct answer to the following question will be Metadata Management.

Explanation:

The management of data about the other data is known as Metadata Management. When the data is generated, updated, deleted, created, metadata is generated.

Benefits of Metadata management:

  • To locate data for a person, the metadata management make it easier.
  • Project delivery become faster.
  • Maintain information of organization.

Hence, the Metadata Management will be the best suitable component which defined as the structure and meaning of business data.

4 0
3 years ago
explain why the database system would not allow a tuple to be inserted into the database through this view
Andrej [43]
For the view of Exercise 4.18, explain why the database system would not allow a tuple to be inserted into the database through this view.
For reference
For the database of Figure 4.12, write a query to find the ID of each employee with no manager. Note that an employee may simply have no manager listed or may have a null manager. Write your query using an outer join and then write it again using no outer join at all.
OUTER JOIN
select e.ID from employee e left outer join manages m on e.ID = m.ID
where m.manager_id is null;
NO OUTER
select e.ID from employee e where e.ID not in (select m.ID from manages m) or e.ID in (select m.ID from manages m where m.manager_id is null);
6 0
3 years ago
Other questions:
  • What is Administrator windows 10
    8·1 answer
  • Advantages of heading attributes
    5·1 answer
  • Join my discord server! CODE IS (CebjBXN)​
    12·2 answers
  • Biểu diễn cây sau bằng mảng một chiều
    12·1 answer
  • During system testing, developers test the program in an environment that is very similar to how the program will eventually be
    11·2 answers
  • Assume you are using the text's array-based queue and have just instantiated a queue of capacity 10. You enqueue 5 elements and
    13·1 answer
  • NEED HELP ASAP!!!!!!
    7·2 answers
  • The success criteria are used to judge whether a project is successful. False True <br> need it now
    13·2 answers
  • In a _____, there is no skipping or repeating instructions. A. iteration B. sequence C. selection D. conditional
    10·1 answer
  • Hi am feeling really happy just passed a test after a lot of tries :-)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!