Created
May 3, 2022 14:10
-
-
Save zekhoi/f85e41665ec05c7f399fa852d851a611 to your computer and use it in GitHub Desktop.
Revisions
-
zekhoi created this gist
May 3, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ function BracketCombinations(num) { // code goes here const factorial = (number) => { let k = 1 for(let i = number; i >= 1; i--){ k *= i; } return k } const finalresult = factorial(2 * num) / (factorial(num + 1) * factorial(num)) return finalresult; } // keep this function call here console.log(BracketCombinations(readline()));