Skip to content

Commit

Permalink
Update rbtree.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-shandar authored Jan 24, 2025
1 parent fad0d53 commit d52ae91
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions notes/rbtree.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ type Node<T> = {
```rust
enum List<T> {
None,
Some<&Node<T>> // compilation error, but it doesn't matter for the article's purpose.
Some<&Node<T>>, // compilation error, but it doesn't matter for the article's purpose.
}

// or
type List<T> = Option<&Node<T>>;

struct Node<T> {
value: T
next: List<T>
value: T,
next: List<T>,
}
```

Expand All @@ -43,8 +43,8 @@ type Node<T> = {
```rust
type Tree<T> = Option<&Node<T>>;
struct Node<T> {
left: Tree<T>
value: T
right: Tree<T>
left: Tree<T>,
value: T,
right: Tree<T>,
}
```

0 comments on commit d52ae91

Please sign in to comment.