Created
February 23, 2022 16:45
-
-
Save gpDA/978e98b6e8f613b7725c4e66a99d56c3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// recursion | |
const recursiveFindRange = (low, high) => { | |
if (low === high - 2) return [high - 1]; | |
let res = recursiveFindRange(low, high - 1) | |
res.push(high - 1); | |
return res; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment