• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

keon / algorithms / 370 / 1
76%
master: 76%

Build:
DEFAULT BRANCH: master
Ran 05 Jun 2018 04:08AM UTC
Files 124
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Jun 2018 04:07AM UTC coverage: 91.661% (+0.04%) from 91.617%
370.1

push

travis-ci

keon
Zhengli0817 patch 1 - update topsort.py (#295)

* Update bst.py

* Update topsort.py

The original algo is wrong because it is using BFS, it should use DFS instead.

A counter-example is provided below:

depGraph = {
    "a" : [ "b" ],
    "b" : [ "c" ],
    "c" :  [ 'e'],
    'e' : [ 'g' ],
    "d" : [ ],
    "f" : ["e" , "d"],
    "g" : [ ]
}

given = [ "b", "c", "a", "d", "e", "f", "g" ]

The output of ret_dep_graph() is: ['e', 'g', 'c', 'b', 'a', 'd', 'f']

Clearly, 'g' has to be done before 'e'.

* Update topsort.py

* Update topsort.py

The original algo in topsort.py is wrong because it is using BFS, it should use DFS instead.

A counter-example is provided below:

depGraph = {
"a" : [ "b" ],
"b" : [ "c" ],
"c" : [ 'e'],
'e' : [ 'g' ],
"d" : [ ],
"f" : ["e" , "d"],
"g" : [ ]
}

given = [ "b", "c", "a", "d", "e", "f", "g" ]

The output of ret_dep_graph() is: ['e', 'g', 'c', 'b', 'a', 'd', 'f']

Clearly, 'g' has to be done before 'e'.

* Update topsort.py

* Create __init__.py

* Update __init__.py

* Update __init__.py

* Create test_topsort.py

* Update topsort.py

* Update test_topsort.py

* Update __init__.py

* Update and rename topsort.py to top_sort.py

* Update top_sort.py

* Update __init__.py

* Update test_topsort.py

2836 of 3094 relevant lines covered (91.66%)

0.92 hits per line

Source Files on job 370.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 147
  • Travis Job 370.1
  • 97e5e85c on github
  • Prev Job for on master (#360.1)
  • Next Job for on master (#371.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc