944,116 Members | Top Members by Rank

Ad:
Apr 27th, 2007
0

linear time algorithem

Expand Post »
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².)
Similar Threads
Reputation Points: 9
Solved Threads: 0
Newbie Poster
shamma is offline Offline
7 posts
since Apr 2007
Apr 28th, 2007
1

Re: linear time algorithem

Why?
Team Colleague
Reputation Points: 1135
Solved Threads: 172
Super Senior Demiposter
Rashakil Fol is offline Offline
2,479 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Computer Science Forum Timeline: to solve instances of size 200 in 1 minute
Next Thread in Computer Science Forum Timeline: DrScheme - Convert a string into a list of words





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC