Sort Dates
easy
1. You are given an array(arr) of different dates in format DD-MM-YYYY. 2. You have to sort these dates in increasing order.
Constraints
1 <= N <= 10000 All dates are between year 0 to year 2500
Format
Input
An Integer N arr1 arr2.. n integers
Output
Check the sample output and question video.
Example
Sample Input
5
12041996
20101996
05061997
12041989
11081987
Sample Output
11081987
12041989
12041996
20101996
05061997
Question Video