Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6feb6d8

Browse files
committed
add six new solutions
1 parent c32a8fe commit 6feb6d8

File tree

7 files changed

+51
-3
lines changed

7 files changed

+51
-3
lines changed

101-200/169-majority-element.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
Author :- Rishabh Jain <contact@rishabh1403.com>
3+
Solution for :- https://leetcode.com/problems/majority-element/
4+
blog for this code :- https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-defang-ip-address
5+
youtube video :- https://youtu.be/s_CepLCQHNY
6+
*/
7+
18

29
// sort and find middle
310
var majorityElement = function (nums) {

1101-1200/1185-day-f-week.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
Author :- Rishabh Jain <contact@rishabh1403.com>
3+
Solution for :- https://leetcode.com/problems/day-of-the-week/
4+
blog for this code :- https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-defang-ip-address
5+
youtube video :- https://youtu.be/s_CepLCQHNY
6+
*/
7+
18
var dayOfTheWeek = function (day, month, year) {
29
const days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
310

1201-1300/1252-cells-with-odd-values.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
1+
/*
2+
Author :- Rishabh Jain <contact@rishabh1403.com>
3+
Solution for :- https://leetcode.com/problems/cells-with-odd-values-in-a-matrix/
4+
blog for this code :- https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-defang-ip-address
5+
youtube video :- https://youtu.be/s_CepLCQHNY
6+
*/
27

38
var oddCells = function (n, m, indices) {
49
const row = new Array(n).fill(0)

1201-1300/1281-subtract-product-sum-of-digits.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
1+
/*
2+
Author :- Rishabh Jain <contact@rishabh1403.com>
3+
Solution for :- https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/
4+
blog for this code :- https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-defang-ip-address
5+
youtube video :- https://youtu.be/s_CepLCQHNY
6+
*/
27

38
var subtractProductAndSum = function (n) {
49
let product = 1, sum = 0;

801-900/867-transpose-matrix.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
1+
/*
2+
Author :- Rishabh Jain <contact@rishabh1403.com>
3+
Solution for :- https://leetcode.com/problems/transpose-matrix/
4+
blog for this code :- https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-defang-ip-address
5+
youtube video :- https://youtu.be/s_CepLCQHNY
6+
*/
27

38
var transpose = function (A) {
49

901-1000/929-unique-email-address.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
Author :- Rishabh Jain <contact@rishabh1403.com>
3+
Solution for :- https://leetcode.com/problems/unique-email-addresses/
4+
blog for this code :- https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-defang-ip-address
5+
youtube video :- https://youtu.be/s_CepLCQHNY
6+
*/
7+
18
var numUniqueEmails = function (emails) {
29
const set = new Set();
310

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Solutions of all the questions from Leetcode in JavaScript.
2626

2727
- 167.Two Sum-II - [Question](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/) | [Source Code](https://github.com/rishabh1403/leetcode-javascript-solutions/blob/master/101-200/167-two-sum-ii.js) | [Blog](https://rishabh1403.com/leetcode-solution-of-two-sum-ii-in-javascript) | [Youtube Video](https://www.youtube.com/watch?v=MjxN8HIzIRc)
2828

29+
- 169.Majority Element - [Question](https://leetcode.com/problems/majority-element/) | [Source Code]() | [Blog]() | [Youtube Video]()
30+
2931
- 217.Contains Duplicate - [Question](https://leetcode.com/problems/contains-duplicate/) | [Source Code](https://github.com/rishabh1403/leetcode-javascript-solutions/blob/master/201-300/217-contains-duplicate.js) | [Blog](https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-contains-duplicate) | [Youtube Video](https://youtu.be/cuR5uyV8snc)
3032

3133
- 219.Contains Duplicate II - [Question](https://leetcode.com/problems/contains-duplicate-ii/) | [Source Code](https://github.com/rishabh1403/leetcode-javascript-solutions/blob/master/201-300/219-contains-duplicate-ii.js) | [Blog](https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-contains-duplicate-ii) | [Youtube Video](https://youtu.be/O4MF2wBOrTM)
@@ -42,8 +44,18 @@ Solutions of all the questions from Leetcode in JavaScript.
4244

4345
- 771.Jewels and Stones - [Question](https://leetcode.com/problems/jewels-and-stones/) | [Source Code](https://github.com/rishabh1403/leetcode-javascript-solutions/blob/master/701-800/771-jewels-and-stones.js) | [Blog](https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-jewels-and-stones) | [Youtube Video](https://youtu.be/cNVJZF5UT1w)
4446

47+
- 867.Transpose Matrix - [Question](https://leetcode.com/problems/transpose-matrix/) | [Source Code]() | [Blog]() | [Youtube Video]()
48+
49+
- 929.Unique Email Addresses - [Question](https://leetcode.com/problems/unique-email-addresses/) | [Source Code]() | [Blog]() | [Youtube Video]()
50+
4551
- 1108.Defanging an IP Address - [Question](https://leetcode.com/problems/defanging-an-ip-address/) | [Source Code](https://github.com/rishabh1403/leetcode-javascript-solutions/blob/master/1101-1200/1108-defang-ip-address.js) | [Blog](https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-defang-ip-address) | [Youtube Video](https://youtu.be/s_CepLCQHNY)
4652

53+
- 1185.Day of the Week - [Question](https://leetcode.com/problems/day-of-the-week/) | [Source Code]() | [Blog]() | [Youtube Video]()
54+
55+
- 1252.Cells with Odd Values in a Matrix - [Question](https://leetcode.com/problems/cells-with-odd-values-in-a-matrix/) | [Source Code]() | [Blog]() | [Youtube Video]()
56+
57+
- 1281.Subtract the Product and Sum of Digits of an Integer - [Question](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/) | [Source Code]() | [Blog]() | [Youtube Video]()
58+
4759
- 1342.Number of Steps to Reduce a Number to Zero - [Question](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/) | [Source Code](https://github.com/rishabh1403/leetcode-javascript-solutions/blob/master/1301-1400/1342-reduce-numer-to-zero.js) | [Blog](https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-number-of-steps-to-reduce-a-number-to-zero) | [Youtube Video](https://www.youtube.com/watch?v=sQYhrMf1VMc)
4860

4961
- 1365.How Many Numbers Are Smaller Than the Current Number - [Question](https://leetcode.com/problems/how-many-numbers-are-smaller-than-the-current-number/) | [Source Code](https://github.com/rishabh1403/leetcode-javascript-solutions/blob/master/1301-1400/1365-how-many-numbers-smaller-than-current-number.js) | [Blog](https://rishabh1403.com/posts/coding/leetcode/2020/03/leetcode-how-many-numbers-smaller-than-current-number) | [Youtube Video](https://youtu.be/a2RWy9kqOhs)

0 commit comments

Comments
 (0)