Skip to content

Commit 3f4c85b

Browse files
authored
Fixed functions prot name (print, show)
func print => func show ( all the code updated with the new function 'show') done ✅
1 parent b22da71 commit 3f4c85b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/go/sorted_linked_list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func size(list *List) int {
4545
}
4646

4747
// Prints the values of the elements in the list
48-
func print(list *List) {
48+
func show(list *List) {
4949
for i := 0; i < list.numberOfElements; i++ {
5050
fmt.Printf("%v ", list.recordArray[i].value)
5151
}
@@ -127,7 +127,7 @@ func main() {
127127

128128
fmt.Println()
129129
fmt.Println("Printing the list...")
130-
print(&list)
130+
show(&list)
131131
fmt.Println("Size of the list:", size(&list))
132132

133133
fmt.Println()
@@ -137,7 +137,7 @@ func main() {
137137

138138
fmt.Println()
139139
fmt.Println("Printing the list...")
140-
print(&list)
140+
show(&list)
141141
fmt.Println("Size of the list:", size(&list))
142142

143143
fmt.Println()

0 commit comments

Comments
 (0)