I asked that question too, it's horribly contrived imho, but the way it's worded it seems like they expect us to make links to individual objects. Can you make a class that can only have a single object ?Originally Posted by Blodrast
we can choose how we implement it, but he (the professor) seems to be a big fan of the non-limited numbers, such as BigInteger. It really depends on the context which we're not getting...Again, I'm not sure I get it. Do you need more than 4 bytes or such to store the Dukats ?
(4 bytes assuming 2^^32 is enough for the amount of Dukats, of course).
Well, we can use any strucutre we want, but they want to be able to ask for the lightest and heaviest item in real time and to add and remove items in O(log n), I think hashmaps have near O(1) so they're defiantly okay, but I need to get the weight in there somehow...For the "current big problem": I dunno, do you HAVE to come up with a unique identifier ?
I assume you know it's okay to have collisions in hash tables...so...
Also, the choice of the data structure that you'll use should be interesting - at a first glance, I'd say hash tables, since they're generally the most efficient ones...
I'm not too experienced with ahshmaps either, we've only used them once. (did I mention I wrote my first java class 10 weeks or so ago, the current structure is over 60pages already and only halfway done)
nah, I appreciate a different view on the mattersigh, I'm afraid that instead of help you're just getting more questions here...sorry.![]()
I wish they made what they want'ed more clear though...
Bookmarks