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

keon / algorithms / 370
76%

Build:
DEFAULT BRANCH: master
Ran 05 Jun 2018 04:08AM UTC
Jobs 1
Files 124
Run time 9s
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

pending completion
370

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

64 of 64 new or added lines in 2 files covered. (100.0%)

2836 of 3094 relevant lines covered (91.66%)

0.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 370.1 05 Jun 2018 04:08AM UTC 0
91.66
Travis Job 370.1
Source Files on build 370
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #370
  • 97e5e85c on github
  • Prev Build on master (#360)
  • Next Build on master (#371)
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