const solution = N => {
let binaryNumArr = N.toString(2).split("");
let oneIdx=[];
for (let i=0; i<binaryNumArr.length; i++){
if (binaryNumArr[i]==="1"){
oneIdx.push(Number(i));
}
}
let binaryGap = (oneIdx.map((el, idx)=>{
return (oneIdx[idx-1]>=0?
(el-oneIdx[idx-1]-1):0);
}));
return Math.max.apply(null, binaryGap);
}
grid-column-start / grid-column-end
grid-column
display
설정한 부모한테 주는 것이 아니라 자식에게 부여하는 것이다.typeOfSilluet {
display: grid;
grid-template-columns: repeat(2, 1fr);
.silluetSquare {
border: 1px solid var(--FilterColor);
&:last-child {
grid-column: 1 / 3;
}
}
grid-area
order
grid-template-columns