Algorithm · Goldman Sachs · Easy
People filling out an online form provide dates as text. Before these values are saved in a database, convert each one into a consistent, storage-friendly representation. You receive dates written as Day Month Year, with these rules: Day includes an ordinal suffix: use "st" for values such as "1st", "21st", and "31st"; use "nd" for values such as "2nd" and "22nd"; use "rd" for values such as "3rd" and "23rd"; every other day uses "th", such as "4th" or "12th". Month is…
Checking your access…