please tell someone what is wrong in this..
assume that there are k sorted files and each file contain n/k elements.To sort all these k files in to a single files we use merge algorithm that is first merge file1 and file 2 and later resultant file will be merged with third file continue this process until all files are merged.and we know that time taken for merging two sorted files of length m and n is O(m+n).
since we are merging two files of length n/k so it takes O(n/k+n/k)=O(2n/k)
merging resultant file with third file takes O(2n/k+n/k)=O(3n/k)
continue this process then total time complexity=
O(2n/k)+O(3n/k)+O(4n/k)+O(5n/k)+-------------------+O(kn/k)
=O(n/k)(2+3+4+5+6+----------------------+k)
=O(n/k)(k(k+1)/2)
=O(nk)
here k=logn
time complexity=O(nlogn)