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
9 changes: 9 additions & 0 deletions leetcode3/황은지/1861. Rotating the Box.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @param {character[][]} boxGrid
* @return {character[][]}
*/
var rotateTheBox = function (boxGrid) {
const output = Array.from({ length: boxGrid[0].length }, () =>
Array(boxGrid.length),
);
};
21 changes: 21 additions & 0 deletions leetcode3/황은지/3314. Construct the Minimum Bitwise Array I.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @param {number[]} nums
* @return {number[]}
*/
var minBitwiseArray = function(nums) {
const arr=Array(1000).fill(-1);
const max=Math.max(...nums);

for(let num=0;num<=max;num++){
const afterOr=num|(num+1);
if(arr[afterOr]===-1) arr[afterOr]=num;
}

const result=Array(nums.length);
for(let i=0;i<nums.length;i++){
result[i]=arr[nums[i]]
}

return result;

};