hudge data sortting, searching etc...

Write here if you have problems with your Java source code

Moderator: Board moderators

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

hudge data sortting, searching etc...

Post by Tanu »

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 »

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)
Tanu
Learning poster
Posts: 70
Joined: Sun May 29, 2005 12:46 pm
Location: Mars

Again

Post by Tanu »

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 »

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)
Tanu
Learning poster
Posts: 70
Joined: Sun May 29, 2005 12:46 pm
Location: Mars

HI

Post by Tanu »

Thankx
Tanu
Post Reply

Return to “Java”