This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const degrees = 180 / Math.PI; | |
function radian2degrees (rad: number): number { | |
return rad * degrees; | |
} | |
function degrees2radian (deg: number): number { | |
return deg / degrees; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://leetcode.com/submissions/detail/508355858/ | |
/** | |
* Definition for singly-linked list. | |
* function ListNode(val, next) { | |
* this.val = (val===undefined ? 0 : val) | |
* this.next = (next===undefined ? null : next) | |
* } | |
*/ | |
/** | |
* @param {ListNode} l1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const S = [1, 2, 3]; | |
const n = 4; | |
const f = (S, n) => { | |
const stack = S.map((coin) => [coin]); | |
const permuts = new Set(); | |
while (stack.length) { | |
const current = stack.shift(); | |
const sum = current.reduce((s, c) => s + c); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const S = [1, 2, 3]; | |
const n = 4; | |
const f = (S, n) => { | |
const stack = S.map((coin) => [coin]); | |
const permuts = new Set(); | |
while (stack.length) { | |
const current = stack.shift(); | |
const sum = current.reduce((s, c) => s + c); |
OlderNewer