Javascript two pointers, moving zeros and transpose
This solutions uses techniques from Moving Zeros and Image Reverse problems.\n\nvar rotateTheBox = function(box) {\n  for(let r=0; r<box.length;r++){\n    let i
This solutions uses techniques from Moving Zeros and Image Reverse problems.\n```\nvar rotateTheBox = function(box) {\n  for(let r=0; r<box.length;r++){\n    let idx = null\n    for(let c = 0;c<box[r].length;c++){      \n      const curr = box[r][c]\n      if(curr === \'*\'){\n        idx = null\n        continue\n      }\n      if(curr === \'#\' && idx === null){\n        idx = c\n        continue\n      }\n      if(curr === \'.\' && \n         box[r][idx] === \'#\' && \n         idx <= c){\n        box[r][idx] = \'.\'\n        box[r][c] = \'#\'\n        idx++\n      }\n    }\n  }\n  return transpose(box)\n};\n\nfunction transpose(arr){\n  const B = []\n  for(let c = 0; c < arr[0].length; c++){\n    if(!B[c]) B[c] = []\n    for(let r = 0; r < arr.length; r++){      \n      B[c][r] = arr[r][c]\n    }\n    B[c].reverse()\n  }\n  return B\n}\n```
['Matrix', 'JavaScript']