@Doorknob冰 Do you think if we can get some support for this on meta, we could get the devs to activate SoundCloud embeds for PPCG? I think that would greatly increase the feasibility of audio processing challenges.
Unflatten an Array
code-golfarray-manipulation
Inspired by this question on Mathematica.SE.
Say you've got a nested list/array of some arbitrary structure (the lists at each level don't necessarily have the same length). For simplicity, we'll assume that the nodes are non-negative integers. As...
if I golf that down it's 62 bytes. I hope that should be beatable
I think some recursive Pyth solution will probably beat it
but just in case, I think I'll just post the golfed version of that myself, and declare that I won't accept, so no one can just steal that and kill the challenge
@Optimizer I don't think a regex-based approach in other languages would be much shorter, except maybe Perl. and Mathematica is still 43, so that 46 was competition for CJam than Mathematica still is ;)
@MartinBüttner Awkwardly, my code's shorter if I take one list as STDIN input but the other as function argument... I'm guessing that's not allowed? :P
This challenge was inspired by a question on Mathematica.SE.
Say you've got a nested list/array of some arbitrary structure (the lists at each level don't necessarily have the same length). For simplicity, we'll assume that the nodes are non-negative integers or empty arrays. As an example
[[[1...
I have a question idea myself but I'm not sure if it's been done yet: Given a permutation, find the next one lexicographically, wrapping back to the first permutation if the input is the last one
Next Lexicographical Permutation code-golf array-manipulation
Not sure if this has been done before so I thought I'd post here first
Given an array representing a permutation of the first n >= 1 nonnegative integers, find the next lexicographical permutation. If the input was the last possible ...