mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-14 04:30:58 +00:00
Add build script for Go and update Go codes.
This commit is contained in:
@@ -25,7 +25,7 @@ func linearSearchArray(nums []int, target int) int {
|
||||
func linearSearchLinkedList(node *ListNode, target int) *ListNode {
|
||||
// 遍历链表
|
||||
for node != nil {
|
||||
// 找到目标元素,返回其索引
|
||||
// 找到目标结点,返回之
|
||||
if node.Val == target {
|
||||
return node
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user