Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions DoublyLinkedList/DoublyLinkedList.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,7 @@ func (list *LinkedList) GetLast() (int, bool) {
if list.head == nil {
return 0, false
}
current := list.head
for current.next != nil {
current = current.next
}
return current.data, true
return list.tail.data, true
}

func (list *LinkedList) GetSize() int {
Expand Down