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
3 changes: 1 addition & 2 deletions structure/linkedlist/doubly.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (ll *Doubly[T]) DelAtBeg() (T, bool) {
return val, true
}

// DetAtEnd Delete a node at the end of the linkedlist
// DelAtEnd Delete a node at the end of the linkedlist
func (ll *Doubly[T]) DelAtEnd() (T, bool) {
// no item
if ll.Head.Prev == nil {
Expand All @@ -104,7 +104,6 @@ func (ll *Doubly[T]) DelAtEnd() (T, bool) {
// DelByPos deletes node at middle based on position in list
// and returns value. If empty or position of node is less than linked list length, returns false
func (ll *Doubly[T]) DelByPos(pos int) (T, bool) {

switch {
case ll.Head == nil:
var r T
Expand Down