Online Programming Server

Login

Login with facebook [?]

Facebook

Problem 1093: Sorting II

Problem ID 1093
Title Sorting II
pdf  
Description
Sorting is a basic problem in Computer Science. Can you write a program to sort integers? This time, you may need a faster algorithm.
Input
The first line of the input contains an single integer N (1 ≤ N ≤ 100000), the number of data.

The second line of the input contains N integers to be sorted. Their values are between 0 and 109, inclusively.
Output
Output N integers in a line, the sorted integers.
Sample Input
4
3 2 1 5
Sample Output
1 2 3 5
Hint
Quick Sort
Heap Sort
Merge Sort
Last Modified 2013-01-12 20:32:25
Time Limit 1 seconds
Memory Limit 64 MB
Accepted Solutions 6
Submitted Solutions 9
Difficulty Factor 102