书 📚:17 在读 · 303 想读 · 183 读过
影 🎬:2 在看 · 110 想看 · 181 看过
音 🎵:0 在听 · 0 想听 · 1 听过
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
// LeetCode Hire Writeup | |
interface Action<T> { | |
payload?: T; | |
type: string; | |
} | |
class EffectModule { | |
count = 1; | |
message = "hello!"; |
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
let queue = [] // 队列 | |
let isUp = true // 是否向上 | |
let isRunning = false // 是否正在运行 | |
let currentFloor = 1 // 当前楼层 | |
let timer = null | |
const INTERVAL_TIME = 1000 | |
const MAX_FLOOR = 10 | |
const MIN_FLOOR = 1 |
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 sum = x => { | |
* if (x === 0) { | |
* return 0 | |
* } | |
* | |
* return x + sum(x - 1) | |
* } | |
* | |
* sum(10) Works well, we will get 55; |