Skip to content

Commit

Permalink
Updated isEmpty function definition. (#31)
Browse files Browse the repository at this point in the history
'return len(self.stack) == []' is a problematic definition. it should be either  'return len(self.stack) == 0' or 'self.stack == []'
  • Loading branch information
emredogan7 authored and OmkarPathak committed Nov 3, 2019
1 parent 9033612 commit 1572e6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Stack/Stack.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
" \n",
" # to check if stack is empty\n",
" def isEmpty(self):\n",
" return len(self.stack) == []\n",
" return len(self.stack) == 0\n",
" \n",
" # for checking the size of stack\n",
" def size(self):\n",
Expand Down

0 comments on commit 1572e6a

Please sign in to comment.