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

  What is one example from the list in table of popular

based on the keston 2013 article what are the advantages and disadvantages of using mashups? what is one example from

  Elements from a html document

Function test Count List Elements should simply retrieve an array of all list elements on the page and assert that their total count is 3.

  Square with a rectangle of the same size

Write a Java statement to initialize a variable square with a rectangle object whose top left corner is (10, 20) and whose sides all have length 40. Then write a statement that replaces square with a rectangle of the same size and top left corner ..

  Balancing binary search trees

Balancing Binary Search Trees,  Consider the file BST.java (a link to this file is provided below for downloading purposes) which defines a generic Binary Search Tree class.

  Java method that contains code to be executed

Write a short Java method that contains code for which it is probably impossible for that code to ever be executed, but your favorite Java compiler does not detect this fact.

  Specify, design and implement a class

Specify, design and implement a class that can be used to hold information about a musical note. Test it with an appropriate driver program.

  Design an application to take and process a pizza order

Design an application to take and process a pizza order. The user should be able to make pizza order choices from list boxes, and the application should display the order price.

  Implement one class called parking meter

Implement one class called parking meter, that is a simple model of a coin operated parking meter

  Write a class named retailitem

Write a class named RetailItem that holds data about an item in a retail store. The class should have the given member variables:

  In this project you will simulate some people catching fish

in this project you will simulate some people catching fish in a lake. the purpose of the assignment is to get used to

  Java script program for song

Construct a JavaScript program that declares and prints an array that includes at least twenty of your favorite songs.

  What is an abstract class and how does it differ from the

question 1 what is an abstract class and how does it differ from a regular class? question 2 why are abstract 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