Removed due to copyright infringement.
Solutions
01-solution.jsView on GitHub ↗
function index(array, n) {
if (array.length <= n) {
return -1;
}
return Math.pow(array[n], n);
}02-solution.pyView on GitHub ↗
def index(array, n):
if not len(array) > n:
return -1
return array[n]**n