Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions leetcode3/정진영/1861. Rotating the Box
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* @param {character[][]} boxGrid
* @return {character[][]}
*/
var rotateTheBox = function(boxGrid) {
// 1. 돌 먼저 오른쪽으로
// 1-1. * 이면 stop, # 이동
// 2. 90도 회전

const m = boxGrid.length; // 1x3
const n = boxGrid[0].length;

let ans = Array.from(
{length : n},
() => Array(m).fill('.')); // 3x1

for (let i = 0; i<m; i++){

}
};
24 changes: 24 additions & 0 deletions leetcode3/정진영/3314. Construct the Minimum Bitwise Array I
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @param {number[]} nums
* @return {number[]}
*/
var minBitwiseArray = function(nums) {
let ans = [];

for (let i = 0; i<nums.length; i++){
let found = false;

for (let j = 0; j<nums[i]; j++){
if (( j | (j+1)) == nums[i] ){
ans.push(j);
found = true;
break;
}
}

if (found == false){
ans.push(-1);
}
}
return ans;
};