- Fork this repo to your work station.
- Answer the following questions by creating a JavaScript file for each of the questions.
- Commit and push your code to your fork.
- Create a pull request back to the master branch of the origin repo.
-
Create a function that takes an unlimited amount of number parameters, and returns an array of all the permutations possible. For example,
myFunction(4, 7, 2) {}
should return[472, 427, 724, 742, 247, 274]
. -
Create a function that can find the Nth smallest number in an array. The array can be very very big, so you are not allowed using the
Array.sort()
method. Try to build a function that would perform fast. Also, explain why usingArray.sort()
isn't a good idea when sorting large arrays.