Skip to content

Commit

Permalink
Merge branch 'hotfix/1.28.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ecgan committed Aug 8, 2020
2 parents e782e30 + 6092e69 commit cae839b
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ The listing below is sorted based on LeetCode #. If you are interested to see my
| 1145 | [Binary Tree Coloring Game](/problems/binary-tree-coloring-game/) | Medium | Tree, depth-first search |
| 1150 | [Check If a Number Is Majority Element in a Sorted Array](/problems/is-a-a-majority-element) | Easy | Array, binary search |
| 1153 | [String Transforms Into Another String](/problems/string-transforms-into-another-string) | Hard | Graph |
| 1154 | [Day of the Year](/problems/ordinal-number-of-date) | Easy | Math |
| 1154 | [Day of the Year](problems/day-of-the-year) | Easy | Math |
| 1160 | [Find Words That Can Be Formed by Characters](/problems/find-words-that-can-be-formed-by-characters) | Easy | Array, hash table |
| 1161 | [Maximum Level Sum of a Binary Tree](/problems/maximum-level-sum-of-a-binary-tree) | Medium | Graph |
| 1162 | [As Far from Land as Possible](/problems/as-far-from-land-as-possible) | Medium | Breadth-first search, graph |
Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leetcode",
"version": "1.28.0",
"version": "1.28.1",
"description": "My solutions for LeetCode problems.",
"main": "index.js",
"scripts": {
Expand All @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/ecgan/leetcode",
"devDependencies": {
"codecov": "^3.6.5",
"codecov": "^3.7.2",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.20.1",
Expand Down
46 changes: 46 additions & 0 deletions problems/day-of-the-year/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Day of the Year

LeetCode #: [1154](https://leetcode.com/problems/day-of-the-year/)

Difficulty: Easy

Topics: Math.

## Problem

Given a string `date` representing a [Gregorian calendar](https://en.wikipedia.org/wiki/Gregorian_calendar) date formatted as `YYYY-MM-DD`, return the day number of the year.

Example 1:

```text
Input: date = "2019-01-09"
Output: 9
Explanation: Given date is the 9th day of the year in 2019.
```

Example 2:

```text
Input: date = "2019-02-10"
Output: 41
```

Example 3:

```text
Input: date = "2003-03-01"
Output: 60
```

Example 4:

```text
Input: date = "2004-03-01"
Output: 61
```

Constraints:

- `date.length == 10`
- `date[4] == date[7] == '-'`, and all other `date[i]`'s are digits
- `date` represents a calendar date between Jan 1st, 1900 and Dec 31, 2019.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const dayOfYear = require('./solution')
const dayOfYear = require('./dayOfYear')

test('Example 1', () => {
const date = '2019-01-09'
Expand Down
7 changes: 0 additions & 7 deletions problems/ordinal-number-of-date/README.md

This file was deleted.

0 comments on commit cae839b

Please sign in to comment.