Merge pull request #418 from keepgoing147/patch-1
[golang] Simplify stack IsEmpty function
This commit is contained in:
commit
40e0aa11f4
@ -20,10 +20,7 @@ func NewLinkedListStack() *LinkedListStack {
|
||||
}
|
||||
|
||||
func (this *LinkedListStack) IsEmpty() bool {
|
||||
if this.topNode == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return this.topNode == nil
|
||||
}
|
||||
|
||||
func (this *LinkedListStack) Push(v interface{}) {
|
||||
|
Loading…
Reference in New Issue
Block a user