prefixed Array. to reduce(), sort(), map() methods in snippets.

This commit is contained in:
piyuesh
2017-12-13 17:41:45 +05:30
parent 75673219dc
commit e652559fdb
11 changed files with 11 additions and 11 deletions

View File

@ -2,7 +2,7 @@
Use recursion.
For each letter in the given string, create all the partial anagrams for the rest of its letters.
Use `map()` to combine the letter with each partial anagram, then `reduce()` to combine all anagrams in one array.
Use `Array.map()` to combine the letter with each partial anagram, then `Array.reduce()` to combine all anagrams in one array.
Base cases are for string `length` equal to `2` or `1`.
```js