19
Challenge
Given a n-dimensional array of integers and a permutation of the first n natural numbers, permute the array dimensions accordingly.
Details
This challenge is inspired by MATLABs permute. demonstration
The permutation is given as a list of integers, e.g. [1,3,2] means 1 gets mapped to...