954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

linear time algorithem

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².)

shamma
Newbie Poster
7 posts since Apr 2007
Reputation Points: 9
Solved Threads: 0
 

Why?

Rashakil Fol
Super Senior Demiposter
Team Colleague
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You