Content-Length: 252758 | pFad | http://github.com/TheAlgorithms/Go/commit/21729b8a7e69be117f11e1419e6dd61c4fdf9cd0

56 Update structure/linkedlist/doubly.go · TheAlgorithms/Go@21729b8 · GitHub
Skip to content

Commit 21729b8

Browse files
Update structure/linkedlist/doubly.go
Co-authored-by: Taj <tjgurwara99@users.noreply.github.com>
1 parent 21e29f7 commit 21729b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

structure/linkedlist/doubly.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ func (ll *Doubly[T]) DelAtBeg() (T, bool) {
7171
func (ll *Doubly[T]) DelAtEnd() (T, bool) {
7272
// no item
7373
if ll.Head == nil {
74-
return *new(T), false
74+
var r T
75+
return r, false
7576
}
7677

7778
// only one item

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/TheAlgorithms/Go/commit/21729b8a7e69be117f11e1419e6dd61c4fdf9cd0

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy