添加链表理论基础 python go版本

This commit is contained in:
leeeeeeewii 2022-01-19 22:48:45 +08:00 committed by GitHub
parent 728fe17a10
commit 850939e407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 2 deletions

View File

@ -195,10 +195,20 @@ class ListNode {
``` ```
Python Python
```python
class ListNode:
def __init__(self, val, next=None):
self.val = val
self.next = next
```
Go Go
```go
type ListNode struct {
Val int
Next *ListNode
}
```