You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
785 B

3 years ago
package main
2 years ago
import "fmt"
3 years ago
/**
0 0
*/
/**
* Definition for singly-linked list.
* type ListNode struct {
* Val int
* Next *ListNode
* }
*/
2 years ago
type ListNode struct {
Val int
Next *ListNode
}
func main() {
l1 := new(ListNode)
l2 := new(ListNode)
l1.Val = 0
l2.Val = 2
fmt.Println(addTwoNumbers(l1, l2))
}
func addTwoNumbers(l1 *ListNode, l2 *ListNode) *ListNode {
fmt.Printf("l1Val: %v\n", l1.Val)
fmt.Printf("l2Val: %v\n", l2.Val)
return nil
}