stayhungry

stayhungry

  • 분류 전체보기 (18)
    • iOS Swift (4)
    • 재테크 (0)
    • 잡담 (2)
    • Algorithm (2)
    • React (9)
    • Javascript Typescript (0)
    • Data Structure (1)
  • 홈
  • 태그
  • 방명록
RSS 피드
로그인
로그아웃 글쓰기 관리

stayhungry

컨텐츠 검색

태그

cocoapod 대기업퇴사 퇴사이후 ios Unexpectedly found nil while implicitly unwrapping an Optional value Swift `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)

최근글

댓글

공지사항

아카이브

Algorithm(2)

  • BFS 너비 우선 탐색

    인접한 이웃 노드를 모두 방문한 다음에 이웃의 이웃 노드들을 방문한다. Point: Queue 사용 Pseudocode 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 void search(Node root) { Queue queue = new Queue(); root.marked = true; queue.enqueue(root); while(!queue.isEmpty()) { Node r = queue.dequeue(); visit(r); foreach(Node n in r.adjacent) { if(n.marked == false) { n.marked = true; queue.enqueue(n); } } } } Colored ..

    2021.01.09
  • DFS 깊이 우선 탐색

    분기를 전부 탐색한 뒤에 이웃 노드의 분기를 탐색 Point: 재귀, 노드 방문했는지 체크 Pseudocode void search(Node root){ if(root == null) return; root.visited = true; foreach(node in root.adjacent) { if(node.visited == false) { search(node); } } }

    2021.01.09
이전
1
다음
티스토리
© 2018 TISTORY. All rights reserved.

티스토리툴바