Skip to main content

Timeline for Shuffle an array, a little bit

Current License: CC BY-SA 4.0

35 events
when toggle format what by license comment
May 15, 2022 at 22:34 answer added naffetS timeline score: 1
S Apr 16, 2022 at 12:05 history bounty ended lyxal
S Apr 16, 2022 at 12:05 history notice removed lyxal
S Apr 10, 2022 at 1:53 history bounty started lyxal
S Apr 10, 2022 at 1:53 history notice added lyxal Reward existing answer
Apr 8, 2022 at 19:05 answer added naffetS timeline score: 2
Apr 6, 2022 at 11:06 answer added Lecdi timeline score: 2
Apr 6, 2022 at 3:37 answer added naffetS timeline score: 1
Apr 5, 2022 at 20:44 history edited flawr CC BY-SA 4.0
added 30 characters in body
Apr 5, 2022 at 20:43 comment added flawr @Steffan Yes that is acceptable!
Apr 5, 2022 at 18:00 history tweeted twitter.com/StackCodeGolf/status/1511403301878865932
Apr 5, 2022 at 15:20 comment added naffetS Can we take the length of the array, but -1?
Apr 5, 2022 at 14:00 comment added flawr @DarrelHoffman That only happens for k=1, for k=2 all permutations are permissible for your example. So to answer your question: we can't guarantee that, actually all entries could be ones.
Apr 5, 2022 at 13:32 comment added Darrel Hoffman If the input could contain duplicates, is it at least guaranteed that it's possible to mix them up such that no value is the same? Consider the trivial example [ 1, 1, 2 ] - No matter how you mix that, one of the values that was 1 in the input will still be 1 in the output.
Apr 5, 2022 at 7:12 comment added flawr @Steffan Yes the input may contain duplicates.
Apr 5, 2022 at 7:11 history edited flawr CC BY-SA 4.0
added 112 characters in body
Apr 5, 2022 at 7:09 comment added flawr @KevinCruijssen Under the current rules yes it can be arbitrary, but I think we can add this assumption as it leads to no loss of generality.
Apr 5, 2022 at 6:31 comment added Kevin Cruijssen I assume the input-array isn't guaranteed to be a [1,n]-ranged list and can basically be any list?
Apr 5, 2022 at 6:30 answer added Kevin Cruijssen timeline score: 4
Apr 5, 2022 at 4:25 answer added chunes timeline score: 1
Apr 5, 2022 at 3:31 history became hot network question
Apr 5, 2022 at 2:41 comment added Unrelated String @Steffan "Instead of shuffling an input array, you can also just take k and the length of the array as an input, and output a permutation in a suitable encoding", so it's unclear without clarification from OP, but in the meantime you can roll your own duplicate-free input.
Apr 5, 2022 at 0:35 answer added jezza_99 timeline score: 1
Apr 5, 2022 at 0:06 answer added Neil timeline score: 1
Apr 4, 2022 at 23:10 answer added Jonathan Allan timeline score: 2
Apr 4, 2022 at 22:33 answer added naffetS timeline score: 2
Apr 4, 2022 at 22:19 comment added naffetS We can't guarantee that the input has no duplicates, correct?
Apr 4, 2022 at 22:11 comment added att If we output all possible permutations, may outputs be repeated?
Apr 4, 2022 at 20:30 history edited flawr CC BY-SA 4.0
added 105 characters in body
Apr 4, 2022 at 20:22 answer added Giuseppe timeline score: 6
Apr 4, 2022 at 20:14 answer added Arnauld timeline score: 2
Apr 4, 2022 at 20:00 answer added Ajax1234 timeline score: 1
Apr 4, 2022 at 19:35 comment added flawr @chunes The input is a possible output: All permissible permutations must be able to occur!
Apr 4, 2022 at 19:31 comment added chunes Is the input a possible output or do we have to force each element to change?
Apr 4, 2022 at 19:23 history asked flawr CC BY-SA 4.0