analogcoding

7/16 -2주 프로젝트 본문

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 에 넣어서 사용해야하는 것 같다. 정확하게 뭘 짚고 넘어가고 싶은데 시간이 촉박하다..ㅠㅠ

'Be well coding > In Immersive' 카테고리의 다른 글

7/18 - 2주 프로젝트  (0) 2019.07.21
7/17 - 2주 프로젝트  (0) 2019.07.18
7/15 - 2주 프로젝트  (0) 2019.07.16
7/13 - 2주 프로젝트  (0) 2019.07.13
7/12 - 2주 프로젝트  (0) 2019.07.13
Comments