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
hudge data sortting, searching etc...
Moderator: Board moderators
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
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
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)
Born from ashes - restarting counter of problems (800+ solved problems)
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
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
![:)](./images/smilies/icon_smile.gif)
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)
Born from ashes - restarting counter of problems (800+ solved problems)