Search Results

Showing results 1 to 5 of 5
Search took 0.06 seconds.
Search: Posts Made By: Narue ; Forum: Java and child forums
Forum: Java Nov 22nd, 2008
Replies: 5
Views: 1,383
Posted By Narue
If you choose to make the table size prime, you should treat that as an invariant and make it prime with each resize as well. I say "if you choose to make the table size prime" because there are...
Forum: Java Nov 22nd, 2008
Replies: 5
Views: 1,383
Posted By Narue
1) You know the size of the table and you can keep track of the load factor by modifying a counter when you add or remove a chain. This is pretty efficient.

2) Separate chaining is much more...
Forum: Java Oct 13th, 2008
Replies: 11
Views: 1,383
Posted By Narue
>Is there a better way?
Yes, design the class hierarchy such that you don't need to know the dynamic type of the object. Perhaps some form of strategy pattern would clean up that selection code.
Forum: Java Jan 10th, 2008
Replies: 15
Views: 1,357
Posted By Narue
>public static double max(double[]x)
This signature suggests that you're supposed to pass an array of doubles to the function and the function returns the largest of them. Your code doesn't do that...
Forum: Java Oct 27th, 2004
Replies: 4
Views: 4,942
Posted By Narue
>I'm trying to compare a string to an ArrayList Object.
This is your problem. Unless you can figure out a way to convert the ArrayList to a String so that they are comparable, you'll need to...
Showing results 1 to 5 of 5

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC