Skip to main content

Introduction

Summary

keywords

TODO

HW

Exercise*

Next time


BFS

siblings are visited before children Time complexity $O(V+E)$

DFS

children are visited before siblings

pre-order and post-order traversal

  1. pre-order : add the node to output when first visited(=when pushing into the stack)
  2. post-order : add the node to output when there's no unexplored subnodes.

Topological Sort

input should be directed graph with no cycle.

Excecute task which dependencies has been completed.