[TIL] 21-08-06

0

TIL

목록 보기
46/100
post-thumbnail

알고리즘 스터디

  • 백준 11203 Numbers On a Tree O
  • 백준 2078 무한이진트리 O
  • 백준 6800 Huffman Encoding O
  • 백준 13237 Binary tree O
  • 백준 13116 30번 O
  • 백준 14425 문자열 집합 O
  • 백준 15900 나무 탈출 O
  • 백준 6416 트리인가? ~

CLASS**

  • 백준 2108 통계학 O

알고리즘 스터디

백준 15900 나무 탈출

⚡백준 6416 트리인가?

📌참고자료

  • 이진 트리, 이진 트리의 배열 표현

CLASS**

📌참고자료

  • < cmath > 헤더파일 사용
  • 내림함수 floor()를 이용한 반올림 함수: floor(N + 0.5)
  • map의 요소들을 value값을 기준으로 정렬하기
  1. map을 vector로 이동
    -> vector<pair<int,int>> vec( m.begin(), m.end() );
  2. 비교 함수 작성
    -> bool compare(const pair<int,int>& a, const pair<int,int>& b){...}
  3. vector 정렬
    -> sort(vec.begin(), vec.end(), compare);
profile
Be able to be vulnerable, in search of truth

0개의 댓글