mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-24 09:56:29 +08:00
Fix 结构体 and 类.
This commit is contained in:
parent
731487864f
commit
ff6022796c
2 changed files with 4 additions and 4 deletions
|
@ -63,7 +63,7 @@
|
|||
=== "JavaScript"
|
||||
|
||||
```javascript title=""
|
||||
/* 链表结点结构体 */
|
||||
/* 链表结点类 */
|
||||
class ListNode {
|
||||
val;
|
||||
next;
|
||||
|
@ -77,7 +77,7 @@
|
|||
=== "TypeScript"
|
||||
|
||||
```typescript title=""
|
||||
/* 链表结点结构体 */
|
||||
/* 链表结点类 */
|
||||
class ListNode {
|
||||
val: number;
|
||||
next: ListNode | null;
|
||||
|
@ -595,7 +595,7 @@
|
|||
=== "C++"
|
||||
|
||||
```cpp title=""
|
||||
/* 链表结点结构体 */
|
||||
/* 双向链表结点结构体 */
|
||||
struct ListNode {
|
||||
int val; // 结点值
|
||||
ListNode *next; // 指向后继结点的指针(引用)
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
=== "Go"
|
||||
|
||||
```go title=""
|
||||
/* 链表结点类 */
|
||||
/* 链表结点结构体 */
|
||||
type TreeNode struct {
|
||||
Val int
|
||||
Left *TreeNode
|
||||
|
|
Loading…
Reference in a new issue