File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
L-I/0006 Repeat a String (L-I) Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,16 @@ repeat a given string `str` for `num` of times, and return empty in case the nu
44
55#### Note: you are not allowd to use ` .repeat() ` method.
66
7- ## Test case :
7+ ## For testing :
88
9- - Input: 'abc', 3 => Output: 'abcabcabc'
10- - Input: 'abc', 0 => Output: ''
11- - Input: 'abc', -2 => Output: ''
9+ - run
10+ ```
11+ npm i
12+ ```
13+ to install mocha library, then run
14+ ```
15+ npm test
16+ ```
1217
1318## Solution:
1419
@@ -24,4 +29,5 @@ const repeatStringNumTimes = (str, num) => {
2429};
2530```
2631
27- > - [ click] ( https://www.khanacademy.org/computing/computer-science/algorithms/recursive-algorithms/a/recursion ) To lern more about recursion method
32+ [ click] ( https://www.khanacademy.org/computing/computer-science/algorithms/recursive-algorithms/a/recursion ) To lern more about recursion method
33+
You can’t perform that action at this time.
0 commit comments