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
Inga [223]
3 years ago
13

What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary se

arch
Computers and Technology
1 answer:
laiz [17]3 years ago
4 0

Answer:

O(n²)

Explanation:

The worse case time complexity of insertion sort using binary search for positioning of data would be O(n²).

This is due to the fact that there are quite a number of series of swapping operations that are needed to handle each insertion.

You might be interested in
Write a test program that prompts the user to enter three sides of the triangle (make sure they define an actual triangle), a co
Ivanshal [37]

Answer:

   Scanner in = new Scanner(System.in);

       System.out.print("Please enter 3 sides of a triangle, color and " +

                       "whether it is filled or not (true false): ");

       double s1 = in.nextDouble();

       double s2 = in.nextDouble();

       double s3 = in.nextDouble();

       String color = in.next();

       boolean filled = in.nextBoolean();

       

       Triangle t1 = null;

       

       try {

           t1 = new Triangle(s1, s2, s3, color, filled);

       }

       catch (IllegalTriangleException ite) {

           System.out.println(ite.toString());

       }

       

       System.out.println(t1.toString());

       System.out.printf("Triangle color: %s, Triangle filled: %s%n" +  

                       "Area: %.2f%n" +  

                       "Perimeter: %.2f%n%n",

                   t1.getColor(),  

                   t1.isFilled(),

                   t1.getArea(),

                   t1.getPerimeter());

           

Explanation:

   Scanner in = new Scanner(System.in);

       System.out.print("Please enter 3 sides of a triangle, color and " +

                       "whether it is filled or not (true false): ");

       double s1 = in.nextDouble();

       double s2 = in.nextDouble();

       double s3 = in.nextDouble();

       String color = in.next();

       boolean filled = in.nextBoolean();

       

       Triangle t1 = null;

       

       try {

           t1 = new Triangle(s1, s2, s3, color, filled);

       }

       catch (IllegalTriangleException ite) {

           System.out.println(ite.toString());

       }

       

       System.out.println(t1.toString());

       System.out.printf("Triangle color: %s, Triangle filled: %s%n" +  

                       "Area: %.2f%n" +  

                       "Perimeter: %.2f%n%n",

                   t1.getColor(),  

                   t1.isFilled(),

                   t1.getArea(),

                   t1.getPerimeter());

           

7 0
3 years ago
____ uses markup to define the structure and layout of a web document.
cupoosta [38]
HTML: Hyper Text Markup Language.

HTML is the markup language used for defining the structure, and very basics of a web page - one wouldn't be possible without this language!

HTML is combined with CSS (Cascading Style Sheet) to improve visuals, and combined with a language such as Javascript to add functionality and interaction with the web page.
8 0
4 years ago
3k means about 3 thousand bytes. how would you express two hundred million bytes? .
barxatty [35]
200,000,000 bytes

200,000KB

200MB

0.2GB

etc, etc.
7 0
3 years ago
What is the Explicit Dependencies Principle? Explain why explicit dependencies are better than implicit dependencies.
Zanzabum

Answer:

Explanation:

Explicit Dependencies

<u>It states that the classes and methods should explicitly require , via constructor or method parameters all the collaborating objects that are required for the function to work properly .</u>

Classes with the implicit dependencies cost very high for the maintenance than the explicit dependencies .

Even , the implicit dependencies are difficult to test as they are tightly coupled to their collaborators .

8 0
3 years ago
An employee is working on building a new computer application for a friend. For this purpose, he uses the software that is regis
andrezito [222]

Answer: USed software

Explanation:

5 0
3 years ago
Other questions:
  • The speed of a cpu is expressed in cycles called ________.
    14·1 answer
  • Arpanet was developed by the united states so that there was a communication network that would survive a nuclear war. True or F
    11·1 answer
  • You have just built a new system from scratch. you turn the computer on but the system boot fails and sounds a beep code. what m
    15·1 answer
  • Apollo Couriers, a company providing international express mail services, has a proactive customer communications team. The prim
    8·1 answer
  • When we convert an automaton to a regular expression, we need to build expression not go through certain other states. Below is
    15·1 answer
  • What is the worst case time complexity of insertion sort where position of the data to be inserted is calculated using binary se
    13·1 answer
  • Who is the father of computer?<br>1.Charles Babbage 2.James Waat​
    15·2 answers
  • Collaboration, listening, and negotiating are considered __________ skills.
    11·1 answer
  • A mobile operating system is stored on a ___ chip.​
    11·1 answer
  • What happens if the new context is in memory rather than in a register set and all the register sets are in use?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!