Merge pull request #418 from keepgoing147/patch-1

[golang] Simplify stack IsEmpty function
This commit is contained in:
wangzheng0822 2019-11-17 09:24:18 +08:00 committed by GitHub
commit 40e0aa11f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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{}) {