Sort a list of dates in ascending order given the data format shown below: Each date is in the form dd mmm yyyy where: dd is in the set {0-31} mmm is in the set {Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec} yyyy is four digits Example dates = ['01 Mar 2017','03 Feb 2017','15 Jan 1998'] The array dates sorts to to ['15 Jan 1998' '03 Feb 2017' '01 Mar 2017']
Function Description : Complete the function sortDates in the editor below. sortDates has the following parameter: string dates[n]: an array of strings, each field separated by a space Returns: string arr[n]: The function must return an array of date strings sorted chronologically ascending
Constraints 2≤lengthofdates≤30
Thank Please complete the sortdates function :
Class Results{ Public static List SortDates(List dates) }
HH:mm
part since you don't have a time component. 2. How to sort a date. -- If you get stuck, feel free to revise your question with a minimal reproducible example and explanation of where you got stuck. – Llama