Skip to content

Instantly share code, notes, and snippets.

@panterozo
Created February 23, 2018 21:23
Show Gist options
  • Save panterozo/bafa4b2aefa4c305b3dfa25d5ea72cf1 to your computer and use it in GitHub Desktop.
Save panterozo/bafa4b2aefa4c305b3dfa25d5ea72cf1 to your computer and use it in GitHub Desktop.
Ejercicios Realizados en CodeFights.com
function rotateImage(a) {
let array = [];
for(let i=0; i<a.length; i++){
let arrayIn = [];
let aux = 0;
for(let j=a[i].length-1; j>=0; j--){
//console.log("i:"+i+"|j:"+j+": "+a[j][i]);
arrayIn[aux]=a[j][i];
aux++;
}
array.push(arrayIn);
}
console.log(array);
return array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment