linear time algorithem

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Reply

Join Date: Apr 2007
Posts: 7
Reputation: shamma is an unknown quantity at this point 
Solved Threads: 0
shamma shamma is offline Offline
Newbie Poster

linear time algorithem

 
0
  #1
Apr 27th, 2007
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².)
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,055
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: linear time algorithem

 
1
  #2
Apr 28th, 2007
Why?
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Computer Science Forum


Views: 1165 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Computer Science
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC