Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Complexity T(n)

Write a linear-time algorithm that sorts n distinct
integers, each of which is between 1 and 500.

Hint: Use a 500-element array. (Linear-time means your
algorithm runs in time c*n + b, where c and b are any
constants that do not depend on n.

For example, your algorithm can run in time n, or time 2n +
1, or time 5n + 10, or time 100n + 6, but not time c*n*n =
c*n?.)

Answer Posted / siierbkkueutr

A great resource - many thanks!

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i don't know about working of nested for loop can any one help me

2219


3. Program to find the Sum of give series. a. (1)+(1+2)+(1+2+3)+(1+2+3+4)+……………………………….. b. 1/1+1/9+1/25+1/49+……………...

4872


write a function that allocates memory for a single data type passed as a parameter.the function uses the new operator and return a pointer to the allocated memory.the function must catch and handle any exception during allocation

2841


create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

2674


Code for Easily Using Hash Table?

2963


write a program to perform generic sort in arrays?

3024


Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?

3017


write a function that reverse the elements of an array in place.The function must accept only one pointer value and return void.

4517


Implement a command console for changing settings on a particular object. The command console should allow you to enter a string and will return the response (very similar to a terminal session). The commands are as follows: SET propertyname=newvalue will change the target object’s member named “propertyname” to have a value equal to “newvalue”. If the input value is incompatible (i.e. an int being set to a string), print out an appropriate error message. GET propertyname will print out the current value of the target object’s member named “propertyname”. GET * will print out a list of all target object members and their current values. The system should be extensible for future commands and should accept an arbitrary object, such that another developer could insert another object into the system and rely on the command console to get and set the properties correctly.

3895


How can I Draw an ellipse in 3d space and color it by using graph3d?

2557


write a program that reverses the input number of n.Formulate an equation to come up with the answer.

7636


can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

3183


A suduco given & u hv 2 check if it is incomplete(blanks left),or correct or incorrect

2830


Code for Two Classes for Doing Gzip in Memory?

3221


write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20

3768