Skip to content

Commit e1bafac

Browse files
committed
add
1 parent acfcb68 commit e1bafac

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

jiuzhangsuanfa/skiplist/interface.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package skiplist
2+
3+
type Lesser interface {
4+
Less(other Lesser) bool
5+
}
6+
7+
type MapContainer interface {
8+
Search(Lesser) (Lesser, bool)
9+
ReplaceOrInsert(Lesser) Lesser
10+
Delete(Lesser) (deleted Lesser, found bool)
11+
Min() (less Lesser, found bool)
12+
Max() (less Lesser, found bool)
13+
Ascend(iterHandler func(i Lesser) bool)
14+
Len() int
15+
DeleteMax() (less Lesser, found bool)
16+
}

0 commit comments

Comments
 (0)