Be well coding/In Immersive
7/16 -2주 프로젝트
be well
2019. 7. 16. 14:12
Toy 28번 문제. Binary Heap 정렬 후 탐색.
BinaryHeap.prototype.insert = function(value) {
console.log("후", this._heap);
this._heap.push(value);
console.log("후", this._heap);
function compareNumbers(a, b) {
return a - b;
}
this._heap.sort(compareNumbers);
console.log("후", this._heap);
};
BinaryHeap.prototype.removeRoot = function() {
if (!this._heap.length) {
return undefined;
}
let removeOne = this._heap[0];
console.log("전", this._heap);
this._heap = this._heap.slice(1);
return removeOne;
};
가이드 라인 작성 팁!
read ME 파일에 start 방식이나 간단한 설명과정이 적힌 문서 작성 .
ex) how to get start , how to control
UI 에서 요청이 있을 때 fake 텀을 줄 수도 있다.
네비게이션으로 props 넘기기
2번 째 인자로 props 형태로 전달하고
받을 땐 this.props.navigation.state.params. props Name .
state 에 넣어서 사용해야하는 것 같다. 정확하게 뭘 짚고 넘어가고 싶은데 시간이 촉박하다..ㅠㅠ