Reference no: EM1380172
Your task is to design and implement a sorting algorithm
Algorithm that can sort nonnegative integers that fall within some limit, L
You will have a large array of numbers, of size N
e.g. N=10,000, L=20:
you have 10,000 numbers to sort, but the numbers are only from 0...20 range
You should design an algorithm that works in 0(N+L) time, that is, running time grows as a linear function of the array size, as long as L is not changed
It may be helpful to use one of the Majority Algorithms for inspiration in your thinking about the algorithm
Take integers from standard input (System.in):
Line 1 - single integer specifying number N<=100000 of elements in array 10
Line 2 - single integer specifying the number 1 L<=100, limit on the value of the integers to 7 be sorted 10
Lines 3 to N+2 - integers to be sorted, each 7 in range 0 to L 1
output sorted array to standard output (System.out), with each integer on a separate line
Java program to make choice for a coffee cup size
: Create an application that prompts the user to make a choice for a Coffee cup size, S for Small, T for Tall, G for Grande and V for Venti the rates of cup sizes will be stored in a parallel double array as $2, $2.50, $3.25, and $4.50 respectively.
|
Preparing a java program
: Prepare a program that asks the user how many automobiles are to be explained, and for each automobile it inputs the user's selection of make and color.
|
Creating villian
: Announce a new Villian called sharpay who has a wit of 24, a stealth of sixteen, and who has currently claimed three victims: Chad, Troy, and Gabriella.
|
Creating a class for services
: Make a class for services offered by a hair styling salon. Information fields with a String to hold the service description, a double to hold the price, and an integer to hold average number of minutes it takes to perform the service.
|
Design and implement a sorting algorithm
: Your task is to design and implement a sorting algorithm and running time grows as a linear function of the array
|
Important java questions
: Add a method addText to the Question class, and provide a different implementation of Choice Question that calls add Text rather than storing an array list of selections.
|
Benefits of dynamic over static arrays
: Discuss the benefits of dynamic over-static arrays. Under what conditions will you choose dynamic arrays?
|
Creating class diagram
: Think about a computer system used to manage loans for a library. Libraries loan books, CDs, videos and magazines to registered members.
|
Creating flowchart to compute and print the total sale
: A coorporation's salesman are selling toothpaste and tooth powder. The corporation having fifty salesman gives 10% commission on the sale of toothpaste and 20 percent commission on tooth powder.
|