Results 1 to 2 of 2
- 04-19-2012, 11:36 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 17
- Rep Power
- 0
retrieving the ith heaviest item in constant time
Hi
I have a person class. A person can carry items(saved in a possesions collection<Item>). All Items have a weight. The person class should provide a method to retrieve the ith heaviest item in constant time. What collection type should I use to save these items? I figured the index has to be connected to the weight in a way.
Thanks!
- 04-20-2012, 12:29 PM #2
AN21XX
- Join Date
- Mar 2012
- Location
- Munich
- Posts
- 297
- Rep Power
- 2
Similar Threads
-
Constant scrolling background
By mwr1976 in forum Java 2DReplies: 5Last Post: 04-13-2012, 07:32 AM -
Cannot use as static constant
By KiranA in forum EclipseReplies: 1Last Post: 12-01-2011, 09:19 AM -
Constant Variables
By harshakantha in forum New To JavaReplies: 3Last Post: 06-13-2011, 07:51 AM -
constant variables questions
By sgthale in forum New To JavaReplies: 3Last Post: 05-06-2011, 05:34 AM -
static constant and performance
By felixtfelix in forum New To JavaReplies: 2Last Post: 08-31-2010, 01:43 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks