Skip to content

Commit d60f4a9

Browse files
gmazzoladonnemartin
authored andcommitted
Fix compilation error in graph_challenge notebook (donnemartin#172)
1 parent 96b01d0 commit d60f4a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graphs_trees/graph/graph_challenge.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@
124124
" self.adj_weights = {} # Key = Node, val = weight\n",
125125
"\n",
126126
" def __repr__(self):\n",
127-
" return str(self.id)\n",
127+
" return str(self.key)\n",
128128
"\n",
129-
" def __lt__(self, left, right):\n",
130-
" return left.id < right.id\n",
129+
" def __lt__(self, other):\n",
130+
" return self.key < other.key\n",
131131
"\n",
132132
" def add_neighbor(self, neighbor, weight=0):\n",
133133
" # TODO: Implement me\n",

0 commit comments

Comments
 (0)