14
2
You must fill an array with every number from 0-n
inclusive. No numbers should repeat. However they must be in a random order.
Rules
All standard code-golf rules and standard loopholes are banned
The array must be generated pseudo-randomly. Every possible permutation should have a equal probability.
Input
n
in any way allowed in the I/O post on meta.
Output
The array of numbers scrambled from 0-n
inclusive.
the output can be separated by newlines? – DrnglVrgs – 2017-05-30T20:48:35.517
@Riley opps that was meant to be gone sorry. – Christopher – 2017-05-31T00:48:08.410
@DrnglVrgs yes it can – Christopher – 2017-05-31T00:48:24.547
By "numbers" I assume you mean "integers"? – Zacharý – 2017-08-10T01:12:50.137
Does it have to be an array, or is a list also acceptable? – Kevin Cruijssen – 2017-08-10T07:53:23.203
@KevinCruijssen if a array is not possible (ahem python) then lists are fine. They are basically the same :P – Christopher – 2017-08-10T16:51:21.350
@2EZ4RTZ And if an array is possible, but longer than using a List? ;) – Kevin Cruijssen – 2017-08-11T06:37:59.203
1@KevinCruijssen IMO lists = array but with searching support. So sure use a list – Christopher – 2017-08-11T14:59:54.273