Tengfei's Notes

HIGH


  • Home

  • Categories

  • Archives

  • Tags

  • About

[Leetcode]207. Course Schedule

Posted on 2016-05-28   |   In Algorithm   |     |   Views

Question

There are a total of n courses you have to take, labeled from 0 to n - 1.

Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1]

Given the total number of courses and a list of prerequisite pairs, is it possible for you to finish all courses?

For example:

1
2, [[1,0]]

There are a total of 2 courses to take. To take course 1 you should have finished course 0. So it is possible.

1
2, [[1,0],[0,1]]

There are a total of 2 courses to take. To take course 1 you should have finished course 0, and to take course 0 you should also have finished course 1. So it is impossible.

Read more »

动物庄园

Posted on 2016-05-27   |   In 读过的书   |     |   Views

animal

在我看来,整本书都在讲一个寓意深刻的寓言。

Read more »

xiami music template

Posted on 2016-05-26   |   In HTML   |     |   Views
1
<iframe src="http://musicbox.coding.io/xiamiplayer/1772152245" frameborder="0" scrolling="0" width="430" height="200" align="middle" allowtransparency></iframe>

Time flies by,but we can capture it

Posted on 2016-05-18   |   In iOS   |     |   Views

Time flies by, but we can capture it.

TimeCapturor

timecapturor

Read more »

孩子的眼睛

Posted on 2016-05-17   |   In 随便写点   |     |   Views

image1

每次出去玩,我都喜欢拍街上的孩子。

回来看照片的时候,总感觉他们的脸上或者眼睛里充满了让人无限想象的故事。

Read more »
1234
Tengfei Yang

Tengfei Yang

Embracing The Unknown.

19 posts
9 categories
30 tags
GitHub Linkedin Email Flickr
© 2016 Tengfei Yang