File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 1
- # 1,756 LeetCode solutions in JavaScript
1
+ # 1,757 LeetCode solutions in JavaScript
2
2
3
3
[ https://leetcodejavascript.com ] ( https://leetcodejavascript.com )
4
4
1622
1622
2115|[ Find All Possible Recipes from Given Supplies] ( ./solutions/2115-find-all-possible-recipes-from-given-supplies.js ) |Medium|
1623
1623
2116|[ Check if a Parentheses String Can Be Valid] ( ./solutions/2116-check-if-a-parentheses-string-can-be-valid.js ) |Medium|
1624
1624
2117|[ Abbreviating the Product of a Range] ( ./solutions/2117-abbreviating-the-product-of-a-range.js ) |Hard|
1625
+ 2119|[ A Number After a Double Reversal] ( ./solutions/2119-a-number-after-a-double-reversal.js ) |Easy|
1625
1626
2127|[ Maximum Employees to Be Invited to a Meeting] ( ./solutions/2127-maximum-employees-to-be-invited-to-a-meeting.js ) |Hard|
1626
1627
2129|[ Capitalize the Title] ( ./solutions/2129-capitalize-the-title.js ) |Easy|
1627
1628
2130|[ Maximum Twin Sum of a Linked List] ( ./solutions/2130-maximum-twin-sum-of-a-linked-list.js ) |Medium|
Original file line number Diff line number Diff line change
1
+ /**
2
+ * 2119. A Number After a Double Reversal
3
+
939A
* https://leetcode.com/problems/a-number-after-a-double-reversal/
4
+ * Difficulty: Easy
5
+ *
6
+ * Reversing an integer means to reverse all its digits.
7
+ * - For example, reversing 2021 gives 1202. Reversing 12300 gives 321 as the leading zeros
8
+ * are not retained.
9
+ *
10
+ * Given an integer num, reverse num to get reversed1, then reverse reversed1 to get reversed2.
11
+ * Return true if reversed2 equals num. Otherwise return false.
12
+ */
13
+
14
+ /**
15
+ * @param {number } num
16
+ * @return {boolean }
17
+ */
18
+ var isSameAfterReversals = function ( num ) {
19
+ return num === 0 || num % 10 !== 0 ;
20
+ } ;
You can’t perform that action at this time.
0 commit comments