hudge data sortting, searching etc...

Write here if you have problems with your Java source code

Moderator: Board moderators

Post Reply
User avatar
Tanu
Learning poster
Posts: 70
Joined: Sun May 29, 2005 12:46 pm
Location: Mars

hudge data sortting, searching etc...

Post by Tanu » Sun Nov 13, 2005 11:28 am

HI java programmers,
Here is a problem out of acm...
I want to sort hudge amount of data that is more than ramsize(I don't call what that calls)....
How to manage it??
Give me hints plz

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post by Dominik Michniewski » Sun Nov 13, 2005 12:49 pm

Use heapsort or mergesort based on files. Algorithms are similar to memory based versions, but they are much slower. References to such algorithms should be in algorithm's books.

Best regards
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)

User avatar
Tanu
Learning poster
Posts: 70
Joined: Sun May 29, 2005 12:46 pm
Location: Mars

Again

Post by Tanu » Mon Nov 14, 2005 8:51 am

Hi Mr. Dominik Michniewski,
I'm new in Java programming ...
I can do it by C++...
Would you send me any Java function or book reffering file operation...
Thanx
Tanu

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post by Dominik Michniewski » Mon Nov 14, 2005 9:11 am

Look at java.io package. :) It contains all what you will need (like FileInputStream, FileOutputStream and so on)

Best regards
DM

PS. Link to online javadoc http://java.sun.com/j2se/1.3/docs/api/j ... mmary.html
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)

User avatar
Tanu
Learning poster
Posts: 70
Joined: Sun May 29, 2005 12:46 pm
Location: Mars

HI

Post by Tanu » Mon Nov 14, 2005 9:24 am

Thankx
Tanu

Post Reply

Return to “Java”