Skip to content

lem0nle/algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

algorithm

Build Status Coverage Status

Woof, coding learning!

Stack

method

  • push(self, e)
  • pop(self), return lastobj
  • top(self), return firstobj

magic method

  • len

LinkedList

method

  • insert(self, obj, index=0)
  • remove(self, index)
  • find(self, obj), return index
  • reverse(self)

magic method

  • len
  • iter

Heap

method

  • top(self), return firstobj
  • pop(self), return lastobj

magic method

  • len

PQ(Heap)

method

  • insert(self, ind, item)
  • edit(self, ind, item)
  • pop(self), return index and obj

magic method

  • len
  • in

Graph

Represent a graph with adjacency list

method

  • add_edge(self, s, t, w=1)

other

  • print with graphviz

DenseGraph

Represent a graph with matrix

method

  • add_edge(self, s, t, w=1)

other

  • print with graphviz

FloydAllPairsSP

method

  • dist(self, s, t)

DijkstraSP

Initiate with a source vertex

method

  • dist(self, t)

About

Woof, coding learning!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages