Problem 375. N-Dimensional Array Slice

Given an N-dimensional array, A, an index, I, and a dimension, d, return the I th elements of A in the d dimension.

For Example,

    array_slice( A, 5, 3 )

is equivalent to


Note: eval and str2func cannot be used. This is a Cody restriction.

Solution Stats

28.81% Correct | 71.19% Incorrect
Last solution submitted on May 16, 2019

Problem Comments