Implementation of external sorting algorithm in C++.
Line 1 contains the value of available buffer pages
Line 2 contains the number of records per page
Line 3 contains the total number of records
Line 4 onwards contains list of records. Each record is a non-negative integer.
Print the records in ascending order.