<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Com-Pugh-ter Science</title>
	<atom:link href="http://www.lightspeedtyrannosaurus.com/blog/2008/03/24/com-pugh-ter-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lightspeedtyrannosaurus.com/blog/2008/03/24/com-pugh-ter-science/</link>
	<description>a collection of words in blogular format</description>
	<pubDate>Sun, 01 Aug 2010 04:48:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Radu Grigore</title>
		<link>http://www.lightspeedtyrannosaurus.com/blog/2008/03/24/com-pugh-ter-science/#comment-2054</link>
		<dc:creator>Radu Grigore</dc:creator>
		<pubDate>Fri, 21 Aug 2009 11:05:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.lightspeedtyrannosaurus.com/blog/2008/03/25/com-pugh-ter-science/#comment-2054</guid>
		<description>Random comments:

1. randomLevel() returns an int in the interval [1.. MAX_LEVEL], but the comment says "[0 - MAX_LEVEL}" (note the curly bracket too)

2. Since skip-lists are essentially sorted sets you should probably implement SortedSet.

3. I believe (but didn't check) most JRE collections have custom implementations when something can be done faster. For example addAl(Collection) is (randomized) O(n lg n) the way you do it, but it can be done in O(n) if the collection is actually a sorted set (which you can test).

4. Even if the interface has contains(Object) it's probably nicer if you overload with contains(E), so that clients who say "SkipList s=...; s.contains(e);" don't go thru the cast check.

5. DISTRIUBUTION and MAX_LEVEL could be set by the user.

6. Does the generic toArray work (without warnings)? I thought the only way to do it is to use the magic java.lang.reflect.Array.newInstance (directly or indirectly).

7. You might want to look at the implementation in the last section here: http://infoarena.ro/skiplists

8. It would be nice to give some numbers on how it compares to TreeSet time/space-wise.

9. Since you spent time to write it nicely, it would be nice if people would use it. You should consider sending it as a patch to a library like Apache Commons Collections (http://commons.apache.org/collections/). (I use google collections but they don't say how to send patches, at least i didn't find how.)</description>
		<content:encoded><![CDATA[<p>Random comments:</p>
<p>1. randomLevel() returns an int in the interval [1.. MAX_LEVEL], but the comment says &#8220;[0 - MAX_LEVEL}&#8221; (note the curly bracket too)</p>
<p>2. Since skip-lists are essentially sorted sets you should probably implement SortedSet.</p>
<p>3. I believe (but didn&#8217;t check) most JRE collections have custom implementations when something can be done faster. For example addAl(Collection) is (randomized) O(n lg n) the way you do it, but it can be done in O(n) if the collection is actually a sorted set (which you can test).</p>
<p>4. Even if the interface has contains(Object) it&#8217;s probably nicer if you overload with contains(E), so that clients who say &#8220;SkipList s=&#8230;; s.contains(e);&#8221; don&#8217;t go thru the cast check.</p>
<p>5. DISTRIUBUTION and MAX_LEVEL could be set by the user.</p>
<p>6. Does the generic toArray work (without warnings)? I thought the only way to do it is to use the magic java.lang.reflect.Array.newInstance (directly or indirectly).</p>
<p>7. You might want to look at the implementation in the last section here: <a href="http://infoarena.ro/skiplists" rel="nofollow">http://infoarena.ro/skiplists</a></p>
<p>8. It would be nice to give some numbers on how it compares to TreeSet time/space-wise.</p>
<p>9. Since you spent time to write it nicely, it would be nice if people would use it. You should consider sending it as a patch to a library like Apache Commons Collections (http://commons.apache.org/collections/). (I use google collections but they don&#8217;t say how to send patches, at least i didn&#8217;t find how.)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
