how i can to implement (Balanced Merge Sort) algorithm?
轻俞倾 卺磉?
Hello for all
I want to make Balanced Merge Sort algorithm in my project ,but i face
many problems as,
I can't make this algorithm
and , i don't know ,how i can to establish files to write and read from it ..
Example about this algorithm for members who don't know about BMS
suppose that ::
1-I have main File with name "data.txt" ,
2-I have template files ,F1,F2,F3,F4
2-this file includes these values
10,5,20,30,22,40,35,69,41,25,32,58,21,30,6,55,10,7,8,56,20,30,40,50
22,32,75,88,65,42,84,95,32,64,12,20
Question::
How i can select each time 4 values and put them in array ?
to understand my question please see heare::
first time ,i select (10,5,20,30) store values in array ,after that sort this array and put this sorted values in F1
second time , i select (22,40,35,69) store values in same array,after that sort this array and put this sorted values in F2
3ed tme , i select (41,25,32,58) store values in same array,after that sort this array and put this sorted values in F1
4ed time , i select (21,30,6,55) store values in same array,after that sort this array and put this sorted values in F2
and so on until finishing for all values

