Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 2138 | Replies: 2
![]() |
•
•
Join Date: Jun 2004
Posts: 604
Reputation:
Rep Power: 6
Solved Threads: 6
Hi everyone,
I don't really understand your question. Maybe you can try and explain a little more in detail
Richard West
I don't really understand your question. Maybe you can try and explain a little more in detail
Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
•
•
Join Date: Jul 2005
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
the given data will bestored in a .dat file and the o/p should contain following things:
X is also accepted from console
Given 7 15 8 14 3 1 19 11 13 6 10 12 2 5 4 16 17 18 9 on tape 1 and assuming that only X=4 items can fit in RAM at a time. The sort may be performed as follows:
T1: {7 15 8 14 3 1 19 11 13 6 10 12 2 5 4 16 17 18 9}
T2:
T3: {7 8 14 15} {6 10 12 13} {9 17 18} T3, T4 after 1st pass. T1 is
T4: {1 3 11 19} {2 4 5 16} rewound for re-use.
After 2-way merge of the sorted groups from T3, T4 into T1 and T2
T1: {1 3 7 8 11 14 15 19} {9 17 18}
T2: {2 4 5 6 10 12 13 16}
T3, T4 are rewound for re-use. 2-Way merge of T1, T2 into T3 and T4
T3: {1 2 3 5 6 7 8 9 10 11 12 13 14 15 16 19}
T4: {9 17 18}
The last step is the 2-Way merge of T3, T4 into T1
T1: {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19}
X is also accepted from console
Given 7 15 8 14 3 1 19 11 13 6 10 12 2 5 4 16 17 18 9 on tape 1 and assuming that only X=4 items can fit in RAM at a time. The sort may be performed as follows:
T1: {7 15 8 14 3 1 19 11 13 6 10 12 2 5 4 16 17 18 9}
T2:
T3: {7 8 14 15} {6 10 12 13} {9 17 18} T3, T4 after 1st pass. T1 is
T4: {1 3 11 19} {2 4 5 16} rewound for re-use.
After 2-way merge of the sorted groups from T3, T4 into T1 and T2
T1: {1 3 7 8 11 14 15 19} {9 17 18}
T2: {2 4 5 6 10 12 13 16}
T3, T4 are rewound for re-use. 2-Way merge of T1, T2 into T3 and T4
T3: {1 2 3 5 6 7 8 9 10 11 12 13 14 15 16 19}
T4: {9 17 18}
The last step is the 2-Way merge of T3, T4 into T1
T1: {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19}
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode