🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8469

Re: Having problems with a sort...

#8469
From: Paul Linehan
Date: Wed, 21 Mar 2001 11:21
50 lines
2047 bytes

 "Owen Green" <owen@norobots.unique.com> wrote:


> > Because I must do the sort on disk  - there could potentially be
> > gazillions of these records.


> Ah, well I'm just having to go home, but it may interest you to know that if
> you change


>     myDataString.compareTo(myIndexCompareString) < 0
> to
>     myDataString.compareTo(myIndexCompareString) > 0


I made your change and reran. 


> it comes out in perfect reverse order...


It does and it doesn't.


What I mean by that is that if you use the data I provided, then yes,
it does come out in order, but this is only because the first record
to be inserted also happens to be the lowest in lexicographical order.


However, if you use a slightly larger dataset with records which have
codes "lower" than "Ams3vh45", it doesn't work properly.

 
> Sorry not to be of more help, if you haven't cracked it tomorrow I'll have a
> closer play with it...


Thanks for taking an interest. I would be grateful if you could figure
it out, it's been killing me for a while now.


Paul...

 
> Owen

 	
Technical Details
Message-ID: <3ab88dce.692894920@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!193.120.178.201
References: <3ab4c4e3.444852043@newsgroups.borland.com> <3ab62e22$1_2@dnews> <3ab63e8d.541533744@news.esat.net> <3ab6536e_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,91a554b109e4b985
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-23 04:12:06 PST
From: paul@esat.net (Paul Linehan)
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Having problems with a sort...
Date: Wed, 21 Mar 2001 11:21:37 GMT
Message-ID: <3ab88dce.692894920@newsgroups.borland.com>
References: <3ab4c4e3.444852043@newsgroups.borland.com> <3ab62e22$1_2@dnews> <3ab63e8d.541533744@news.esat.net> <3ab6536e_1@dnews>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: 193.120.178.201
X-Trace: 21 Mar 2001 03:23:11 -0800, 193.120.178.201
Lines: 50
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!cyclone-sf.pbi.net!63.208.208.143!feed2.onemain.com!feed1.onemain.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!193.120.178.201