LeetCode --- 1507. Reformat Date 解题报告

Posted 杨鑫newlfe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1507. Reformat Date 解题报告相关的知识,希望对你有一定的参考价值。

Given a date string in the form Day Month Year, where:

  • Day is in the set "1st", "2nd", "3rd", "4th", ..., "30th", "31st".
  • Month is in the set "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec".
  • Year is in the range [1900, 2100].

Convert the date string to the format YYYY-MM-DD, where:

  • YYYY denotes the 4 digit year.
  • MM denotes the 2 digit month.
  • DD denotes the 2 digit day.

Example 1:

Input: date = "20th Oct 2052"
Output: "2052-10-20"

Example 2:

<

以上是关于LeetCode --- 1507. Reformat Date 解题报告的主要内容,如果未能解决你的问题,请参考以下文章

cf246 ENew Reform (并查集找环)

CodeForces 659E New Reform (图的遍历判环)

CodeForces 723E One-Way Reform

codeforces 723E. One-Way Reform

CF659ENew Reform

codefoces_#346E - New Reform(并查集或dfs)