What is the efficiency of insertion sort

Assignment Help JAVA Programming
Reference no: EM131145190

Regarding the JAVA langauge consider the following questions about sorting:

1: What is the efficiency of insertion sort? (pick one) a. O( n ) b. O(n2) c. O(1) d. O(n logn)

2: Consider selection sort and insertion sort and how much memory these algorithms need in proportion to the size of the array. In other words, do not consider memory required for single variables or looping variables, only memory that is directly proportional to the array. Which of the following is true? (pick one) a. selection sort requires more additional memory than insertion sort. b. insertion sort requires more additional memory than selection sort. c. both selection and insertion sort require the same amount of additional memory. d. neither selection nor insertion sort require additional memory.

3: What is the base case for the recursive merge sort algorithm? (pick one) a. any array that is already sorted. b. a one-element array. c. a zero-element array. d. a two-element array.

4: What is the efficiency of merge sort? (pick one) a. O(1) b. O(n logn) c. O(log n) d. O( n ) e. O(n2)

5: Which of the following sorting algorithms is the fastest? a. selection sort. b. insertion sort. c. merge sort. d. they all run at roughly the same speed.

Reference no: EM131145190

Questions Cloud

Regarding marketing segmentation and target markets : After reading the chapters and lecture notes regarding marketing segmentation and target markets, select one of the following product categories (cars, trucks, SUV’s, shoe stores, men’s or women’s clothing stores, computers, beer, headphones, or fitn..
What is the contents of the array : What is the contents of the array after the first pass of insertion sort - what is the contents of the array after the second pass of insertion sort?
Complete a trend analysis utilizing the income statement : The student should complete a trend analysis utilizing the Income Statement, Balance Sheet, and Cash Flow for the organization. A basic analysis of what trends are developing and why. Minimum of 5 items.
Calculate the unit price of each of the following : Calculate the Unit price of each of the following
What is the efficiency of insertion sort : What is the efficiency of insertion sort - What is the base case for the recursive merge sort algorithm?
Identify a targeted audience within good health hospital : Analyze Good Health Hospital's records and itemize recent nosocomial infections that occurred within the past year. In your report, categorize the different parameters (i.e., person, time, place, ethnicity, and gender) used in the compilation of d..
Describe and explain in deatail what accountability : Describe and explain in deatail what Accountability is. What implications are there for a company and managers involved? Please provide references is any used.
Prepare a short planning proposal for improving an condition : Prepare a short planning proposal (one single-spaced page in memo format) for improving an unsatisfactory condition on the job or in the college program you are currently involved in.
What process-performance management : Describe and explain in detail what Process/Performance Management is. What implications are there for the company and managers involved? Please provide references is any used.

Reviews

Write a Review

JAVA Programming Questions & Answers

  1 write a recursive instance method called

1 write a recursive instance method called countconnectedpipesint row int col. the method must not contain any loops

  Calculates the total annual compensation of a salesperson

Write a Java application using an Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson

  Problem aa savings account object holds a nonnegative

problem aa savings account object holds a nonnegative balance and provides depositk and withdrawk methods where

  Write java application to demonstrate the behavior

The source code is patterned after a similar example that was taken from Joyce Farrell's textbook, Java Programming.

  Write code that prompts the user to enter a string

Write code that prompts the user to enter a string containing ONLY a series of digits, then complete all of the following operations:

  Write a java application that calculates and displays

The application should ask the user to enter the name of the property owner and the assessed value of the property for each owner (total N owners) and calculate the property tax.

  Write a small java application to read the file

Write a small Java program that uses the information you gained in part (a) to read the data in the database and print it to an output text file called accounts.txt

  Design and implement an application to manage a tournament

Design and implement an application to manage a tennis tournament of 16 players - design and implement an application to manage a tournament. Is there anybody who knows how to do this?

  Program that initializes an array with ten random integers

Write a JAVA program that initializes an array with ten random integers and then prints four lines of output, containing

  Create a class to represent a rectangle

Create a class to represent a Rectangle. Your class should contain instance variables for length and width, as well as member method to calculate the area and perimeter

  Method called printpowersof2 that accepts a maximum number

Write a method called printPowersOf2 that accepts a maximum number as an argument and prints each power of 2 from 20 (1) up to that maximum power, inclusive. For example, consider the following calls: printPowersOf2(3); printPowersOf2(10)

  Create an interface called player

Create an interface called Player. The interface has an abstract method called play() that shows a message describing the meaning of "play" to the class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd